home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / amigaunits / amigados.pas next >
Pascal/Delphi Source File  |  2000-01-01  |  130KB  |  4,496 lines

  1. {
  2.     This file is part of the Free Pascal run time library.
  3.  
  4.     A file in Amiga system run time library.
  5.     Copyright (c) 1998-2000 by Nils Sjoholm
  6.     member of the Amiga RTL development team.
  7.  
  8.     See the file COPYING.FPC, included in this distribution,
  9.     for details about the copyright.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14.  
  15.  **********************************************************************}
  16. {
  17.     History:
  18.     Added overlay functions for Pchar->Strings, functions
  19.     and procedures. Now you can mix PChar and Strings e.g
  20.     OpenLibrary('whatis.library',37). No need to cast to
  21.     a PChar.
  22.  
  23.     14 Jul 2000.
  24.     nils.sjoholm@mailbox.swipnet.se
  25. }
  26. unit amigados;
  27.  
  28. INTERFACE
  29.  
  30. {$I amigaoverlays.inc}
  31.  
  32. uses exec, utility, timer;
  33.  
  34. Const
  35.  
  36. { Predefined Amiga DOS global constants }
  37.  
  38.     DOSTRUE     = -1;
  39.     DOSFALSE    =  0;
  40.  
  41. { Mode parameter to Open() }
  42.  
  43.     MODE_OLDFILE        = 1005;         { Open existing file read/write
  44.                                           positioned at beginning of file. }
  45.     MODE_NEWFILE        = 1006;         { Open freshly created file (delete
  46.                                           old file) read/write }
  47.     MODE_READWRITE      = 1004;         { Open old file w/exclusive lock }
  48.  
  49. { Relative position to Seek() }
  50.  
  51.     OFFSET_BEGINNING    = -1;           { relative to Begining Of File }
  52.     OFFSET_CURRENT      = 0;            { relative to Current file position }
  53.     OFFSET_END          = 1;            { relative to End Of File }
  54.  
  55.     BITSPERBYTE         = 8;
  56.     BYTESPERLONG        = 4;
  57.     BITSPERLONG         = 32;
  58.     MAXINT              = $7FFFFFFF;
  59.     MININT              = $80000000;
  60.  
  61. { Passed as type to Lock() }
  62.  
  63.     SHARED_LOCK         = -2;           { File is readable by others }
  64.     ACCESS_READ         = -2;           { Synonym }
  65.     EXCLUSIVE_LOCK      = -1;           { No other access allowed }
  66.     ACCESS_WRITE        = -1;           { Synonym }
  67.  
  68. Type
  69.  
  70.     FileHandle  = BPTR;
  71.     FileLock    = BPTR;
  72.  
  73.     pDateStamp = ^tDateStamp;
  74.     tDateStamp = record
  75.         ds_Days         : Longint;      { Number of days since Jan. 1, 1978 }
  76.         ds_Minute       : Longint;      { Number of minutes past midnight }
  77.         ds_Tick         : Longint;      { Number of ticks past minute }
  78.     end;
  79.  
  80. Const
  81.  
  82.     TICKS_PER_SECOND    = 50;           { Number of ticks in one second }
  83.  
  84. {$PACKRECORDS 4}
  85. Type
  86.  
  87. { Returned by Examine() and ExInfo(), must be on a 4 byte boundary }
  88.  
  89.     pFileInfoBlock = ^tFileInfoBlock;
  90.     tFileInfoBlock = record
  91.         fib_DiskKey      : Longint;
  92.         fib_DirEntryType : Longint;
  93.                         { Type of Directory. If < 0, then a plain file.
  94.                           If > 0 a directory }
  95.         fib_FileName     : Array [0..107] of Char;
  96.                         { Null terminated. Max 30 chars used for now }
  97.         fib_Protection   : Longint;
  98.                         { bit mask of protection, rwxd are 3-0. }
  99.         fib_EntryType    : Longint;
  100.         fib_Size         : Longint;      { Number of bytes in file }
  101.         fib_NumBlocks    : Longint;      { Number of blocks in file }
  102.         fib_Date         : tDateStamp;   { Date file last changed }
  103.         fib_Comment      : Array [0..79] of Char;
  104.                         { Null terminated comment associated with file }
  105.         fib_OwnerUID     : Word;
  106.         fib_OwnerGID     : Word;
  107.         fib_Reserved     : Array [0..31] of Char;
  108.     end;
  109.  
  110. Const
  111.  
  112. { FIB stands for FileInfoBlock }
  113.  
  114. {* FIBB are bit definitions, FIBF are field definitions *}
  115. {* Regular RWED bits are 0 == allowed. *}
  116. {* NOTE: GRP and OTR RWED permissions are 0 == not allowed! *}
  117. {* Group and Other permissions are not directly handled by the filesystem *}
  118.  
  119.     FIBB_OTR_READ       = 15;   {* Other: file is readable *}
  120.     FIBB_OTR_WRITE      = 14;   {* Other: file is writable *}
  121.     FIBB_OTR_EXECUTE    = 13;   {* Other: file is executable *}
  122.     FIBB_OTR_DELETE     = 12;   {* Other: prevent file from being deleted *}
  123.     FIBB_GRP_READ       = 11;   {* Group: file is readable *}
  124.     FIBB_GRP_WRITE      = 10;   {* Group: file is writable *}
  125.     FIBB_GRP_EXECUTE    = 9;    {* Group: file is executable *}
  126.     FIBB_GRP_DELETE     = 8;    {* Group: prevent file from being deleted *}
  127.  
  128.     FIBB_SCRIPT         = 6;    { program is a script (execute) file }
  129.     FIBB_PURE           = 5;    { program is reentrant and rexecutable}
  130.     FIBB_ARCHIVE        = 4;    { cleared whenever file is changed }
  131.     FIBB_READ           = 3;    { ignored by old filesystem }
  132.     FIBB_WRITE          = 2;    { ignored by old filesystem }
  133.     FIBB_EXECUTE        = 1;    { ignored by system, used by Shell }
  134.     FIBB_DELETE         = 0;    { prevent file from being deleted }
  135.  
  136.     FIBF_OTR_READ      = (1 shl FIBB_OTR_READ);
  137.     FIBF_OTR_WRITE     = (1 shl FIBB_OTR_WRITE);
  138.     FIBF_OTR_EXECUTE   = (1 shl FIBB_OTR_EXECUTE);
  139.     FIBF_OTR_DELETE    = (1 shl FIBB_OTR_DELETE);
  140.     FIBF_GRP_READ      = (1 shl FIBB_GRP_READ);
  141.     FIBF_GRP_WRITE     = (1 shl FIBB_GRP_WRITE);
  142.     FIBF_GRP_EXECUTE   = (1 shl FIBB_GRP_EXECUTE);
  143.     FIBF_GRP_DELETE    = (1 shl FIBB_GRP_DELETE);
  144.  
  145.     FIBF_SCRIPT         = 64;
  146.     FIBF_PURE           = 32;
  147.     FIBF_ARCHIVE        = 16;
  148.     FIBF_READ           = 8;
  149.     FIBF_WRITE          = 4;
  150.     FIBF_EXECUTE        = 2;
  151.     FIBF_DELETE         = 1;
  152.  
  153. {* Standard maximum length for an error string from fault.  However, most *}
  154. {* error strings should be kept under 60 characters if possible.  Don't   *}
  155. {* forget space for the header you pass in. *}
  156.  
  157.     FAULT_MAX  = 82;
  158.  
  159. {* All BCPL data must be long Integer aligned.  BCPL pointers are the long Integer
  160.  *  address (i.e byte address divided by 4 (>>2)) *}
  161.  
  162. {* BCPL strings have a length in the first byte and then the characters.
  163.  * For example:  s[0]=3 s[1]=S s[2]=Y s[3]=S                 *}
  164.  
  165.  
  166. Type
  167.  
  168. { returned by Info(), must be on a 4 byte boundary }
  169.  
  170.     pInfoData = ^tInfoData;
  171.     tInfoData = record
  172.         id_NumSoftErrors        : Longint;      { number of soft errors on disk }
  173.         id_UnitNumber           : Longint;      { Which unit disk is (was) mounted on }
  174.         id_DiskState            : Longint;      { See defines below }
  175.         id_NumBlocks            : Longint;      { Number of blocks on disk }
  176.         id_NumBlocksUsed        : Longint;      { Number of block in use }
  177.         id_BytesPerBlock        : Longint;
  178.         id_DiskType             : Longint;      { Disk Type code }
  179.         id_VolumeNode           : BPTR;         { BCPL pointer to volume node }
  180.         id_InUse                : Longint;      { Flag, zero if not in use }
  181.     end;
  182.  
  183. {$PACKRECORDS NORMAL}
  184.  
  185. Const
  186.  
  187. { ID stands for InfoData }
  188.  
  189.         { Disk states }
  190.  
  191.     ID_WRITE_PROTECTED  = 80;   { Disk is write protected }
  192.     ID_VALIDATING       = 81;   { Disk is currently being validated }
  193.     ID_VALIDATED        = 82;   { Disk is consistent and writeable }
  194.  
  195. CONST
  196.  ID_NO_DISK_PRESENT     = -1;
  197.  ID_UNREADABLE_DISK     = $42414400;   { 'BAD\0' }
  198.  ID_DOS_DISK            = $444F5300;   { 'DOS\0' }
  199.  ID_FFS_DISK            = $444F5301;   { 'DOS\1' }
  200.  ID_NOT_REALLY_DOS      = $4E444F53;   { 'NDOS'  }
  201.  ID_KICKSTART_DISK      = $4B49434B;   { 'KICK'  }
  202.  ID_MSDOS_DISK          = $4d534400;   { 'MSD\0' }
  203.  
  204. { Errors from IoErr(), etc. }
  205.  ERROR_NO_FREE_STORE              = 103;
  206.  ERROR_TASK_TABLE_FULL            = 105;
  207.  ERROR_BAD_TEMPLATE               = 114;
  208.  ERROR_BAD_NUMBER                 = 115;
  209.  ERROR_REQUIRED_ARG_MISSING       = 116;
  210.  ERROR_KEY_NEEDS_ARG              = 117;
  211.  ERROR_TOO_MANY_ARGS              = 118;
  212.  ERROR_UNMATCHED_QUOTES           = 119;
  213.  ERROR_LINE_TOO_LONG              = 120;
  214.  ERROR_FILE_NOT_OBJECT            = 121;
  215.  ERROR_INVALID_RESIDENT_LIBRARY   = 122;
  216.  ERROR_NO_DEFAULT_DIR             = 201;
  217.  ERROR_OBJECT_IN_USE              = 202;
  218.  ERROR_OBJECT_EXISTS              = 203;
  219.  ERROR_DIR_NOT_FOUND              = 204;
  220.  ERROR_OBJECT_NOT_FOUND           = 205;
  221.  ERROR_BAD_STREAM_NAME            = 206;
  222.  ERROR_OBJECT_TOO_LARGE           = 207;
  223.  ERROR_ACTION_NOT_KNOWN           = 209;
  224.  ERROR_INVALID_COMPONENT_NAME     = 210;
  225.  ERROR_INVALID_LOCK               = 211;
  226.  ERROR_OBJECT_WRONG_TYPE          = 212;
  227.  ERROR_DISK_NOT_VALIDATED         = 213;
  228.  ERROR_DISK_WRITE_PROTECTED       = 214;
  229.  ERROR_RENAME_ACROSS_DEVICES      = 215;
  230.  ERROR_DIRECTORY_NOT_EMPTY        = 216;
  231.  ERROR_TOO_MANY_LEVELS            = 217;
  232.  ERROR_DEVICE_NOT_MOUNTED         = 218;
  233.  ERROR_SEEK_ERROR                 = 219;
  234.  ERROR_COMMENT_TOO_BIG            = 220;
  235.  ERROR_DISK_FULL                  = 221;
  236.  ERROR_DELETE_PROTECTED           = 222;
  237.  ERROR_WRITE_PROTECTED            = 223;
  238.  ERROR_READ_PROTECTED             = 224;
  239.  ERROR_NOT_A_DOS_DISK             = 225;
  240.  ERROR_NO_DISK                    = 226;
  241.  ERROR_NO_MORE_ENTRIES            = 232;
  242. { added for 1.4 }
  243.  ERROR_IS_SOFT_LINK               = 233;
  244.  ERROR_OBJECT_LINKED              = 234;
  245.  ERROR_BAD_HUNK                   = 235;
  246.  ERROR_NOT_IMPLEMENTED            = 236;
  247.  ERROR_RECORD_NOT_LOCKED          = 240;
  248.  ERROR_LOCK_COLLISION             = 241;
  249.  ERROR_LOCK_TIMEOUT               = 242;
  250.  ERROR_UNLOCK_ERROR               = 243;
  251.  
  252. { error codes 303-305 are defined in dosasl.h }
  253.  
  254. { These are the return codes used by convention by AmigaDOS commands }
  255. { See FAILAT and IF for relvance to EXECUTE files                    }
  256.  RETURN_OK                        =   0;  { No problems, success }
  257.  RETURN_WARN                      =   5;  { A warning only }
  258.  RETURN_ERROR                     =  10;  { Something wrong }
  259.  RETURN_FAIL                      =  20;  { Complete or severe failure}
  260.  
  261. { Bit numbers that signal you that a user has issued a break }
  262.  SIGBREAKB_CTRL_C   = 12;
  263.  SIGBREAKB_CTRL_D   = 13;
  264.  SIGBREAKB_CTRL_E   = 14;
  265.  SIGBREAKB_CTRL_F   = 15;
  266.  
  267. { Bit fields that signal you that a user has issued a break }
  268. { for example:  if (SetSignal(0,0) & SIGBREAKF_CTRL_C) cleanup_and_exit(); }
  269.  SIGBREAKF_CTRL_C   = 4096;
  270.  SIGBREAKF_CTRL_D   = 8192;
  271.  SIGBREAKF_CTRL_E   = 16384;
  272.  SIGBREAKF_CTRL_F   = 32768;
  273.  
  274. { Values returned by SameLock() }
  275.  LOCK_SAME             =  0;
  276.  LOCK_SAME_HANDLER     =  1;       { actually same volume }
  277.  LOCK_DIFFERENT        =  -1;
  278.  
  279. { types for ChangeMode() }
  280.  CHANGE_LOCK    = 0;
  281.  CHANGE_FH      = 1;
  282.  
  283. { Values for MakeLink() }
  284.  LINK_HARD      = 0;
  285.  LINK_SOFT      = 1;       { softlinks are not fully supported yet }
  286.  
  287. { values returned by ReadItem }
  288.  ITEM_EQUAL     = -2;              { "=" Symbol }
  289.  ITEM_ERROR     = -1;              { error }
  290.  ITEM_NOTHING   = 0;               { *N, ;, endstreamch }
  291.  ITEM_UNQUOTED  = 1;               { unquoted item }
  292.  ITEM_QUOTED    = 2;               { quoted item }
  293.  
  294. { types for AllocDosObject/FreeDosObject }
  295.  DOS_FILEHANDLE        =  0;       { few people should use this }
  296.  DOS_EXALLCONTROL      =  1;       { Must be used to allocate this! }
  297.  DOS_FIB               =  2;       { useful }
  298.  DOS_STDPKT            =  3;       { for doing packet-level I/O }
  299.  DOS_CLI               =  4;       { for shell-writers, etc }
  300.  DOS_RDARGS            =  5;       { for ReadArgs if you pass it in }
  301.  
  302.  
  303. {
  304.  *      Data structures and equates used by the V1.4 DOS functions
  305.  * StrtoDate() and DatetoStr()
  306.  }
  307.  
  308. {--------- String/Date structures etc }
  309. Type
  310.        pDateTime = ^tDateTime;
  311.        tDateTime = record
  312.         dat_Stamp   : tDateStamp;      { DOS DateStamp }
  313.         dat_Format,                    { controls appearance of dat_StrDate }
  314.         dat_Flags   : Byte;           { see BITDEF's below }
  315.         dat_StrDay,                    { day of the week string }
  316.         dat_StrDate,                   { date string }
  317.         dat_StrTime : STRPTR;          { time string }
  318.        END;
  319.  
  320. { You need this much room for each of the DateTime strings: }
  321. CONST
  322.  LEN_DATSTRING =  16;
  323.  
  324. {      flags for dat_Flags }
  325.  
  326.  DTB_SUBST      = 0;               { substitute Today, Tomorrow, etc. }
  327.  DTF_SUBST      = 1;
  328.  DTB_FUTURE     = 1;               { day of the week is in future }
  329.  DTF_FUTURE     = 2;
  330.  
  331. {
  332.  *      date format values
  333.  }
  334.  
  335.  FORMAT_DOS     = 0;               { dd-mmm-yy }
  336.  FORMAT_INT     = 1;               { yy-mm-dd  }
  337.  FORMAT_USA     = 2;               { mm-dd-yy  }
  338.  FORMAT_CDN     = 3;               { dd-mm-yy  }
  339.  FORMAT_MAX     = FORMAT_CDN;
  340.  
  341.  
  342. {**********************************************************************
  343. ************************ PATTERN MATCHING ******************************
  344. ************************************************************************
  345.  
  346. * structure expected by MatchFirst, MatchNext.
  347. * Allocate this structure and initialize it as follows:
  348. *
  349. * Set ap_BreakBits to the signal bits (CDEF) that you want to take a
  350. * break on, or NULL, if you don't want to convenience the user.
  351. *
  352. * If you want to have the FULL PATH NAME of the files you found,
  353. * allocate a buffer at the END of this structure, and put the size of
  354. * it into ap_Strlen.  If you don't want the full path name, make sure
  355. * you set ap_Strlen to zero.  In this case, the name of the file, and stats
  356. * are available in the ap_Info, as per usual.
  357. *
  358. * Then call MatchFirst() and then afterwards, MatchNext() with this structure.
  359. * You should check the return value each time (see below) and take the
  360. * appropriate action, ultimately calling MatchEnd() when there are
  361. * no more files and you are done.  You can tell when you are done by
  362. * checking for the normal AmigaDOS return code ERROR_NO_MORE_ENTRIES.
  363. *
  364. }
  365.  
  366. Type
  367.        pAChain = ^tAChain;
  368.        tAChain = record
  369.         an_Child,
  370.         an_Parent   : pAChain;
  371.         an_Lock     : BPTR;
  372.         an_Info     : tFileInfoBlock;
  373.         an_Flags    : Shortint;
  374.         an_String   : Array[0..0] of Char;   { FIX!! }
  375.        END;
  376.  
  377.        pAnchorPath = ^tAnchorPath;
  378.        tAnchorPath = record
  379.         case integer of
  380.         0 : (
  381.         ap_First      : pAChain;
  382.         ap_Last       : pAChain;
  383.         );
  384.         1 : (
  385.         ap_Base,                    { pointer to first anchor }
  386.         ap_Current    : pAChain;    { pointer to last anchor }
  387.         ap_BreakBits,               { Bits we want to break on }
  388.         ap_FoundBreak : Longint;    { Bits we broke on. Also returns ERROR_BREAK }
  389.         ap_Flags      : Shortint;       { New use for extra Integer. }
  390.         ap_Reserved   : Shortint;
  391.         ap_Strlen     : Integer;       { This is what ap_Length used to be }
  392.         ap_Info       : tFileInfoBlock;
  393.         ap_Buf        : Array[0..0] of Char;     { Buffer for path name, allocated by user !! }
  394.         { FIX! }
  395.         );
  396.        END;
  397.  
  398.  
  399. CONST
  400.     APB_DOWILD    =  0;       { User option ALL }
  401.     APF_DOWILD    =  1;
  402.  
  403.     APB_ITSWILD   =  1;       { Set by MatchFirst, used by MatchNext  }
  404.     APF_ITSWILD   =  2;       { Application can test APB_ITSWILD, too }
  405.                                 { (means that there's a wildcard        }
  406.                                 { in the pattern after calling          }
  407.                                 { MatchFirst).                          }
  408.  
  409.     APB_DODIR     =  2;       { Bit is SET IF a DIR node should be }
  410.     APF_DODIR     =  4;       { entered. Application can RESET this }
  411.                                 { bit after MatchFirst/MatchNext to AVOID }
  412.                                 { entering a dir. }
  413.  
  414.     APB_DIDDIR    =  3;       { Bit is SET for an "expired" dir node. }
  415.     APF_DIDDIR    =  8;
  416.  
  417.     APB_NOMEMERR  =  4;       { Set on memory error }
  418.     APF_NOMEMERR  =  16;
  419.  
  420.     APB_DODOT     =  5;       { IF set, allow conversion of '.' to }
  421.     APF_DODOT     =  32;      { CurrentDir }
  422.  
  423.     APB_DirChanged  = 6;       { ap_Current->an_Lock changed }
  424.     APF_DirChanged  = 64;      { since last MatchNext call }
  425.  
  426.  
  427.     DDB_PatternBit  = 0;
  428.     DDF_PatternBit  = 1;
  429.     DDB_ExaminedBit = 1;
  430.     DDF_ExaminedBit = 2;
  431.     DDB_Completed   = 2;
  432.     DDF_Completed   = 4;
  433.     DDB_AllBit      = 3;
  434.     DDF_AllBit      = 8;
  435.     DDB_Single      = 4;
  436.     DDF_Single      = 16;
  437.  
  438. {
  439.  * Constants used by wildcard routines, these are the pre-parsed tokens
  440.  * referred to by pattern match.  It is not necessary for you to do
  441.  * anything about these, MatchFirst() MatchNext() handle all these for you.
  442.  }
  443.  
  444.     P_ANY         =  $80;    { Token for '*' or '#?  }
  445.     P_SINGLE      =  $81;    { Token for '?' }
  446.     P_ORSTART     =  $82;    { Token for '(' }
  447.     P_ORNEXT      =  $83;    { Token for '|' }
  448.     P_OREND       =  $84;    { Token for ')' }
  449.     P_NOT         =  $85;    { Token for '~' }
  450.     P_NOTEND      =  $86;    { Token for }
  451.     P_NOTCLASS    =  $87;    { Token for '^' }
  452.     P_CLASS       =  $88;    { Token for '[]' }
  453.     P_REPBEG      =  $89;    { Token for '[' }
  454.     P_REPEND      =  $8A;    { Token for ']' }
  455.     P_STOP        =  $8B;    { token to force end of evaluation }
  456.  
  457. { Values for an_Status, NOTE: These are the actual bit numbers }
  458.  
  459.     COMPLEX_BIT   =  1;       { Parsing complex pattern }
  460.     EXAMINE_BIT   =  2;       { Searching directory }
  461.  
  462. {
  463.  * Returns from MatchFirst(), MatchNext()
  464.  * You can also get dos error returns, such as ERROR_NO_MORE_ENTRIES,
  465.  * these are in the dos.h file.
  466.  }
  467.  
  468.     ERROR_BUFFER_OVERFLOW  = 303;     { User OR internal buffer overflow }
  469.     ERROR_BREAK            = 304;     { A break character was received }
  470.     ERROR_NOT_EXECUTABLE   = 305;     { A file has E bit cleared }
  471.  
  472. {   hunk types }
  473.      HUNK_UNIT      = 999 ;
  474.      HUNK_NAME      = 1000;
  475.      HUNK_CODE      = 1001;
  476.      HUNK_DATA      = 1002;
  477.      HUNK_BSS       = 1003;
  478.      HUNK_RELOC32   = 1004;
  479.      HUNK_RELOC16   = 1005;
  480.      HUNK_RELOC8    = 1006;
  481.      HUNK_EXT       = 1007;
  482.      HUNK_SYMBOL    = 1008;
  483.      HUNK_DEBUG     = 1009;
  484.      HUNK_END       = 1010;
  485.      HUNK_HEADER    = 1011;
  486.  
  487.      HUNK_OVERLAY   = 1013;
  488.      HUNK_BREAK     = 1014;
  489.  
  490.      HUNK_DREL32    = 1015;
  491.      HUNK_DREL16    = 1016;
  492.      HUNK_DREL8     = 1017;
  493.  
  494.      HUNK_LIB       = 1018;
  495.      HUNK_INDEX     = 1019;
  496.  
  497. {   hunk_ext sub-types }
  498.      EXT_SYMB       = 0  ;     {   symbol table }
  499.      EXT_DEF        = 1  ;     {   relocatable definition }
  500.      EXT_ABS        = 2  ;     {   Absolute definition }
  501.      EXT_RES        = 3  ;     {   no longer supported }
  502.      EXT_REF32      = 129;     {   32 bit reference to symbol }
  503.      EXT_COMMON     = 130;     {   32 bit reference to COMMON block }
  504.      EXT_REF16      = 131;     {   16 bit reference to symbol }
  505.      EXT_REF8       = 132;     {    8 bit reference to symbol }
  506.      EXT_DEXT32     = 133;     {   32 bit data releative reference }
  507.      EXT_DEXT16     = 134;     {   16 bit data releative reference }
  508.      EXT_DEXT8      = 135;     {    8 bit data releative reference }
  509.  
  510.  
  511. Type
  512.  
  513. { All DOS processes have this structure }
  514. { Create and Device Proc returns pointer to the MsgPort in this structure }
  515. { dev_proc = Address(Integer(DeviceProc()) - SizeOf(Task)) }
  516.  
  517.     pProcess = ^tProcess;
  518.     tProcess = record
  519.         pr_Task         : tTask;
  520.         pr_MsgPort      : tMsgPort;     { This is BPTR address from DOS functions  }
  521.         pr_Pad          : Integer;         { Remaining variables on 4 byte boundaries }
  522.         pr_SegList      : BPTR;         { Array of seg lists used by this process  }
  523.         pr_StackSize    : Longint;      { Size of process stack in bytes            }
  524.         pr_GlobVec      : Pointer;      { Global vector for this process (BCPL)    }
  525.         pr_TaskNum      : Longint;      { CLI task number of zero if not a CLI      }
  526.         pr_StackBase    : BPTR;         { Ptr to high memory end of process stack  }
  527.         pr_Result2      : Longint;      { Value of secondary result from last call }
  528.         pr_CurrentDir   : BPTR;         { Lock associated with current directory   }
  529.         pr_CIS          : BPTR;         { Current CLI Input Stream                  }
  530.         pr_COS          : BPTR;         { Current CLI Output Stream                 }
  531.         pr_ConsoleTask  : Pointer;      { Console handler process for current window}
  532.         pr_FileSystemTask : Pointer;    { File handler process for current drive   }
  533.         pr_CLI          : BPTR;         { pointer to ConsoleLineInterpreter         }
  534.         pr_ReturnAddr   : Pointer;      { pointer to previous stack frame           }
  535.         pr_PktWait      : Pointer;      { Function to be called when awaiting msg  }
  536.         pr_WindowPtr    : Pointer;      { Window for error printing }
  537.         { following definitions are new with 2.0 }
  538.         pr_HomeDir      : BPTR;         { Home directory of executing program      }
  539.         pr_Flags        : Longint;      { flags telling dos about process          }
  540.         pr_ExitCode     : Pointer;      { code to call on exit of program OR NULL  }
  541.         pr_ExitData     : Longint;      { Passed as an argument to pr_ExitCode.    }
  542.         pr_Arguments    : STRPTR;       { Arguments passed to the process at start }
  543.         pr_LocalVars    : tMinList;      { Local environment variables             }
  544.         pr_ShellPrivate : ULONG;        { for the use of the current shell         }
  545.         pr_CES          : BPTR;         { Error stream - IF NULL, use pr_COS       }
  546.     end;
  547.  
  548. {
  549.  * Flags for pr_Flags
  550.  }
  551. CONST
  552.  PRB_FREESEGLIST       =  0 ;
  553.  PRF_FREESEGLIST       =  1 ;
  554.  PRB_FREECURRDIR       =  1 ;
  555.  PRF_FREECURRDIR       =  2 ;
  556.  PRB_FREECLI           =  2 ;
  557.  PRF_FREECLI           =  4 ;
  558.  PRB_CLOSEINPUT        =  3 ;
  559.  PRF_CLOSEINPUT        =  8 ;
  560.  PRB_CLOSEOUTPUT       =  4 ;
  561.  PRF_CLOSEOUTPUT       =  16;
  562.  PRB_FREEARGS          =  5 ;
  563.  PRF_FREEARGS          =  32;
  564.  
  565.  
  566. { The long Integer address (BPTR) of this structure is returned by
  567.  * Open() and other routines that return a file.  You need only worry
  568.  * about this struct to do async io's via PutMsg() instead of
  569.  * standard file system calls }
  570.  
  571. Type
  572.  
  573.     pFileHandle = ^tFileHandle;
  574.     tFileHandle = record
  575.         fh_Link         : pMessage;   { EXEC message        }
  576.         fh_Port         : pMsgPort;   { Reply port for the packet }
  577.         fh_Type         : pMsgPort;   { Port to do PutMsg() to
  578.                                           Address is negative if a plain file }
  579.         fh_Buf          : Longint;
  580.         fh_Pos          : Longint;
  581.         fh_End          : Longint;
  582.         fh_Func1        : Longint;
  583.         fh_Func2        : Longint;
  584.         fh_Func3        : Longint;
  585.         fh_Arg1         : Longint;
  586.         fh_Arg2         : Longint;
  587.     end;
  588.  
  589. { This is the extension to EXEC Messages used by DOS }
  590.  
  591.     pDosPacket = ^tDosPacket;
  592.     tDosPacket = record
  593.         dp_Link : pMessage;     { EXEC message        }
  594.         dp_Port : pMsgPort;     { Reply port for the packet }
  595.                                 { Must be filled in each send. }
  596.         case integer of
  597.         0 : (
  598.         dp_Action : Longint;
  599.         dp_Status : Longint;
  600.         dp_Status2 : Longint;
  601.         dp_BufAddr : Longint;
  602.         );
  603.         1 : (
  604.         dp_Type : Longint;      { See ACTION_... below and
  605.                                 * 'R' means Read, 'W' means Write to the
  606.                                 * file system }
  607.         dp_Res1 : Longint;      { For file system calls this is the result
  608.                                 * that would have been returned by the
  609.                                 * function, e.g. Write ('W') returns actual
  610.                                 * length written }
  611.         dp_Res2 : Longint;      { For file system calls this is what would
  612.                                 * have been returned by IoErr() }
  613.         dp_Arg1 : Longint;
  614.         dp_Arg2 : Longint;
  615.         dp_Arg3 : Longint;
  616.         dp_Arg4 : Longint;
  617.         dp_Arg5 : Longint;
  618.         dp_Arg6 : Longint;
  619.         dp_Arg7 : Longint;
  620.         );
  621.     end;
  622.  
  623.  
  624. { A Packet does not require the Message to be before it in memory, but
  625.  * for convenience it is useful to associate the two.
  626.  * Also see the function init_std_pkt for initializing this structure }
  627.  
  628.     pStandardPacket = ^tStandardPacket;
  629.     tStandardPacket = record
  630.         sp_Msg          : tMessage;
  631.         sp_Pkt          : tDosPacket;
  632.     end;
  633.  
  634.  
  635. Const
  636.  
  637. { Packet types }
  638.     ACTION_NIL                  = 0;
  639.     ACTION_GET_BLOCK            = 2;    { OBSOLETE }
  640.     ACTION_SET_MAP              = 4;
  641.     ACTION_DIE                  = 5;
  642.     ACTION_EVENT                = 6;
  643.     ACTION_CURRENT_VOLUME       = 7;
  644.     ACTION_LOCATE_OBJECT        = 8;
  645.     ACTION_RENAME_DISK          = 9;
  646.     ACTION_WRITE                = $57;  { 'W' }
  647.     ACTION_READ                 = $52;  { 'R' }
  648.     ACTION_FREE_LOCK            = 15;
  649.     ACTION_DELETE_OBJECT        = 16;
  650.     ACTION_RENAME_OBJECT        = 17;
  651.     ACTION_MORE_CACHE           = 18;
  652.     ACTION_COPY_DIR             = 19;
  653.     ACTION_WAIT_CHAR            = 20;
  654.     ACTION_SET_PROTECT          = 21;
  655.     ACTION_CREATE_DIR           = 22;
  656.     ACTION_EXAMINE_OBJECT       = 23;
  657.     ACTION_EXAMINE_NEXT         = 24;
  658.     ACTION_DISK_INFO            = 25;
  659.     ACTION_INFO                 = 26;
  660.     ACTION_FLUSH                = 27;
  661.     ACTION_SET_COMMENT          = 28;
  662.     ACTION_PARENT               = 29;
  663.     ACTION_TIMER                = 30;
  664.     ACTION_INHIBIT              = 31;
  665.     ACTION_DISK_TYPE            = 32;
  666.     ACTION_DISK_CHANGE          = 33;
  667.     ACTION_SET_DATE             = 34;
  668.  
  669.     ACTION_SCREEN_MODE          = 994;
  670.  
  671.     ACTION_READ_RETURN          = 1001;
  672.     ACTION_WRITE_RETURN         = 1002;
  673.     ACTION_SEEK                 = 1008;
  674.     ACTION_FINDUPDATE           = 1004;
  675.     ACTION_FINDINPUT            = 1005;
  676.     ACTION_FINDOUTPUT           = 1006;
  677.     ACTION_END                  = 1007;
  678.     ACTION_TRUNCATE             = 1022; { fast file system only }
  679.     ACTION_WRITE_PROTECT        = 1023; { fast file system only }
  680.  
  681. { new 2.0 packets }
  682.     ACTION_SAME_LOCK       = 40;
  683.     ACTION_CHANGE_SIGNAL   = 995;
  684.     ACTION_FORMAT          = 1020;
  685.     ACTION_MAKE_LINK       = 1021;
  686. {}
  687. {}
  688.     ACTION_READ_LINK       = 1024;
  689.     ACTION_FH_FROM_LOCK    = 1026;
  690.     ACTION_IS_FILESYSTEM   = 1027;
  691.     ACTION_CHANGE_MODE     = 1028;
  692. {}
  693.     ACTION_COPY_DIR_FH     = 1030;
  694.     ACTION_PARENT_FH       = 1031;
  695.     ACTION_EXAMINE_ALL     = 1033;
  696.     ACTION_EXAMINE_FH      = 1034;
  697.  
  698.     ACTION_LOCK_RECORD     = 2008;
  699.     ACTION_FREE_RECORD     = 2009;
  700.  
  701.     ACTION_ADD_NOTIFY      = 4097;
  702.     ACTION_REMOVE_NOTIFY   = 4098;
  703.  
  704.     {* Added in V39: *}
  705.     ACTION_EXAMINE_ALL_END  = 1035;
  706.     ACTION_SET_OWNER        = 1036;
  707.  
  708. {* Tell a file system to serialize the current volume. This is typically
  709.  * done by changing the creation date of the disk. This packet does not take
  710.  * any arguments.  NOTE: be prepared to handle failure of this packet for
  711.  * V37 ROM filesystems.
  712.  *}
  713.  
  714.     ACTION_SERIALIZE_DISK  = 4200;
  715.  
  716. {
  717.  * A structure for holding error messages - stored as array with error == 0
  718.  * for the last entry.
  719.  }
  720. Type
  721.        pErrorString = ^tErrorString;
  722.        tErrorString = record
  723.         estr_Nums     : Pointer;
  724.         estr_Strings  : Pointer;
  725.        END;
  726.  
  727.  
  728. { DOS library node structure.
  729.  * This is the data at positive offsets from the library node.
  730.  * Negative offsets from the node is the jump table to DOS functions
  731.  * node = (struct DosLibrary *) OpenLibrary( "dos.library" .. )      }
  732.  
  733. Type
  734.  
  735.     pDosLibrary = ^tDosLibrary;
  736.     tDosLibrary = record
  737.         dl_lib          : tLibrary;
  738.         dl_Root         : Pointer;      { Pointer to RootNode, described below }
  739.         dl_GV           : Pointer;      { Pointer to BCPL global vector       }
  740.         dl_A2           : Longint;      { Private register dump of DOS        }
  741.         dl_A5           : Longint;
  742.         dl_A6           : Longint;
  743.         dl_Errors       : pErrorString; { pointer to array of error msgs }
  744.         dl_TimeReq      : pTimeRequest; { private pointer to timer request }
  745.         dl_UtilityBase  : pLibrary;     { private ptr to utility library }
  746.         dl_IntuitionBase : pLibrary;
  747.     end;
  748.  
  749.     pRootNode = ^tRootNode;
  750.     tRootNode = record
  751.         rn_TaskArray    : BPTR;         { [0] is max number of CLI's
  752.                                           [1] is APTR to process id of CLI 1
  753.                                           [n] is APTR to process id of CLI n }
  754.         rn_ConsoleSegment : BPTR;       { SegList for the CLI }
  755.         rn_Time          : tDateStamp;  { Current time }
  756.         rn_RestartSeg   : Longint;      { SegList for the disk validator process }
  757.         rn_Info         : BPTR;         { Pointer ot the Info structure }
  758.         rn_FileHandlerSegment : BPTR;   { segment for a file handler }
  759.         rn_CliList      : tMinList;     { new list of all CLI processes }
  760.                                         { the first cpl_Array is also rn_TaskArray }
  761.         rn_BootProc     : pMsgPort;     { private ptr to msgport of boot fs      }
  762.         rn_ShellSegment : BPTR;         { seglist for Shell (for NewShell)         }
  763.         rn_Flags        : Longint;      { dos flags }
  764.     end;
  765.  
  766. CONST
  767.  RNB_WILDSTAR   = 24;
  768.  RNF_WILDSTAR   = 16777216;
  769.  RNB_PRIVATE1   = 1;       { private for dos }
  770.  RNF_PRIVATE1   = 2;
  771.  
  772. Type
  773.     pDosInfo = ^tDosInfo;
  774.     tDosInfo = record
  775.         case integer of
  776.         0 : (
  777.         di_ResList : BPTR;
  778.         );
  779.         1 : (
  780.         di_McName       : BPTR;          { Network name of this machine; currently 0 }
  781.         di_DevInfo      : BPTR;          { Device List }
  782.         di_Devices      : BPTR;          { Currently zero }
  783.         di_Handlers     : BPTR;          { Currently zero }
  784.         di_NetHand      : Pointer;       { Network handler processid; currently zero }
  785.         di_DevLock,                      { do NOT access directly! }
  786.         di_EntryLock,                    { do NOT access directly! }
  787.         di_DeleteLock   : tSignalSemaphore; { do NOT access directly! }
  788.         );
  789.     end;
  790.  
  791. { ONLY to be allocated by DOS! }
  792.  
  793.        pCliProcList = ^tCliProcList;
  794.        tCliProcList = record
  795.         cpl_Node   : tMinNode;
  796.         cpl_First  : Longint;      { number of first entry in array }
  797.         cpl_Array  : Array[0..0] of pMsgPort;
  798.                              { [0] is max number of CLI's in this entry (n)
  799.                               * [1] is CPTR to process id of CLI cpl_First
  800.                               * [n] is CPTR to process id of CLI cpl_First+n-1
  801.                               }
  802.        END;
  803.  
  804. { structure for the Dos resident list.  Do NOT allocate these, use       }
  805. { AddSegment(), and heed the warnings in the autodocs!                   }
  806.  
  807. Type
  808.        pSegment = ^tSegment;
  809.        tSegment = record
  810.         seg_Next  : BPTR;
  811.         seg_UC    : Longint;
  812.         seg_Seg   : BPTR;
  813.         seg_Name  : Array[0..3] of Char;      { actually the first 4 chars of BSTR name }
  814.        END;
  815.  
  816. CONST
  817.  CMD_SYSTEM    =  -1;
  818.  CMD_INTERNAL  =  -2;
  819.  CMD_DISABLED  =  -999;
  820.  
  821.  
  822. { DOS Processes started from the CLI via RUN or NEWCLI have this additional
  823.  * set to data associated with them }
  824. Type
  825.     pCommandLineInterface = ^tCommandLineInterface;
  826.     tCommandLineInterface = record
  827.         cli_Result2        : Longint;      { Value of IoErr from last command }
  828.         cli_SetName        : BSTR;         { Name of current directory }
  829.         cli_CommandDir     : BPTR;         { Lock associated with command directory }
  830.         cli_ReturnCode     : Longint;      { Return code from last command }
  831.         cli_CommandName    : BSTR;         { Name of current command }
  832.         cli_FailLevel      : Longint;      { Fail level (set by FAILAT) }
  833.         cli_Prompt         : BSTR;         { Current prompt (set by PROMPT) }
  834.         cli_StandardInput  : BPTR;         { Default (terminal) CLI input }
  835.         cli_CurrentInput   : BPTR;         { Current CLI input }
  836.         cli_CommandFile    : BSTR;         { Name of EXECUTE command file }
  837.         cli_Interactive    : Longint;      { Boolean; True if prompts required }
  838.         cli_Background     : Longint;      { Boolean; True if CLI created by RUN }
  839.         cli_CurrentOutput  : BPTR;         { Current CLI output }
  840.         cli_DefaultStack   : Longint;      { Stack size to be obtained in long words }
  841.         cli_StandardOutput : BPTR;         { Default (terminal) CLI output }
  842.         cli_Module         : BPTR;         { SegList of currently loaded command }
  843.     end;
  844.  
  845. { This structure can take on different values depending on whether it is
  846.  * a device, an assigned directory, or a volume.  Below is the structure
  847.  * reflecting volumes only.  Following that is the structure representing
  848.  * only devices.
  849.  }
  850.  
  851. { structure representing a volume }
  852.  
  853.     pDeviceList = ^tDeviceList;
  854.     tDeviceList = record
  855.         dl_Next         : BPTR;         { bptr to next device list }
  856.         dl_Type         : Longint;      { see DLT below }
  857.         dl_Task         : pMsgPort;     { ptr to handler task }
  858.         dl_Lock         : BPTR;         { not for volumes }
  859.         dl_VolumeDate   : tDateStamp;   { creation date }
  860.         dl_LockList     : BPTR;         { outstanding locks }
  861.         dl_DiskType     : Longint;      { 'DOS', etc }
  862.         dl_unused       : Longint;
  863.         dl_Name         : BSTR;         { bptr to bcpl name }
  864.     end;
  865.  
  866. { device structure (same as the DeviceNode structure in filehandler.h) }
  867.  
  868.     pDevInfo = ^tDevInfo;
  869.     tDevInfo = record
  870.         dvi_Next        : BPTR;
  871.         dvi_Type        : Longint;
  872.         dvi_Task        : Pointer;
  873.         dvi_Lock        : BPTR;
  874.         dvi_Handler     : BSTR;
  875.         dvi_StackSize   : Longint;
  876.         dvi_Priority    : Longint;
  877.         dvi_Startup     : Longint;
  878.         dvi_SegList     : BPTR;
  879.         dvi_GlobVec     : BSTR;
  880.         dvi_Name        : BSTR;
  881.     end;
  882.  
  883. {    structure used for multi-directory assigns. AllocVec()ed. }
  884.  
  885.        pAssignList = ^tAssignList;
  886.        tAssignList = record
  887.         al_Next : pAssignList;
  888.         al_Lock : BPTR;
  889.        END;
  890.  
  891.  
  892. { combined structure for devices, assigned directories, volumes }
  893.  
  894.    pDosList = ^tDosList;
  895.    tDosList = record
  896.     dol_Next            : BPTR;           {    bptr to next device on list }
  897.     dol_Type            : Longint;        {    see DLT below }
  898.     dol_Task            : pMsgPort;       {    ptr to handler task }
  899.     dol_Lock            : BPTR;
  900.     case integer of
  901.     0 : (
  902.         dol_Handler : record
  903.           dol_Handler    : BSTR;      {    file name to load IF seglist is null }
  904.           dol_StackSize,              {    stacksize to use when starting process }
  905.           dol_Priority,               {    task priority when starting process }
  906.           dol_Startup    : Longint;   {    startup msg: FileSysStartupMsg for disks }
  907.           dol_SegList,                {    already loaded code for new task }
  908.           dol_GlobVec    : BPTR;      {    BCPL global vector to use when starting
  909.                                  * a process. -1 indicates a C/Assembler
  910.                                  * program. }
  911.         end;
  912.     );
  913.     1 : (
  914.         dol_Volume       : record
  915.           dol_VolumeDate : tDateStamp; {    creation date }
  916.           dol_LockList   : BPTR;       {    outstanding locks }
  917.           dol_DiskType   : Longint;    {    'DOS', etc }
  918.         END;
  919.     );
  920.     2 : (
  921.         dol_assign       :  record
  922.           dol_AssignName : STRPTR;        {    name for non-OR-late-binding assign }
  923.           dol_List       : pAssignList;   {    for multi-directory assigns (regular) }
  924.         END;
  925.     dol_Name            : BSTR;           {    bptr to bcpl name }
  926.     );
  927.    END;
  928.  
  929. Const
  930.  
  931. { definitions for dl_Type }
  932.  
  933.     DLT_DEVICE          = 0;
  934.     DLT_DIRECTORY       = 1;
  935.     DLT_VOLUME          = 2;
  936.     DLT_LATE            = 3;       {    late-binding assign }
  937.     DLT_NONBINDING      = 4;       {    non-binding assign }
  938.     DLT_PRIVATE         = -1;      {    for internal use only }
  939.  
  940. {    structure return by GetDeviceProc() }
  941. Type
  942.  
  943.        pDevProc = ^tDevProc;
  944.        tDevProc = record
  945.         dvp_Port        : pMsgPort;
  946.         dvp_Lock        : BPTR;
  947.         dvp_Flags       : Longint;
  948.         dvp_DevNode     : pDosList;    {    DON'T TOUCH OR USE! }
  949.        END;
  950.  
  951. CONST
  952. {    definitions for dvp_Flags }
  953.      DVPB_UNLOCK   =  0;
  954.      DVPF_UNLOCK   =  1;
  955.      DVPB_ASSIGN   =  1;
  956.      DVPF_ASSIGN   =  2;
  957.  
  958. {    Flags to be passed to LockDosList(), etc }
  959.      LDB_DEVICES   =  2;
  960.      LDF_DEVICES   =  4;
  961.      LDB_VOLUMES   =  3;
  962.      LDF_VOLUMES   =  8;
  963.      LDB_ASSIGNS   =  4;
  964.      LDF_ASSIGNS   =  16;
  965.      LDB_ENTRY     =  5;
  966.      LDF_ENTRY     =  32;
  967.      LDB_DELETE    =  6;
  968.      LDF_DELETE    =  64;
  969.  
  970. {    you MUST specify one of LDF_READ or LDF_WRITE }
  971.      LDB_READ      =  0;
  972.      LDF_READ      =  1;
  973.      LDB_WRITE     =  1;
  974.      LDF_WRITE     =  2;
  975.  
  976. {    actually all but LDF_ENTRY (which is used for internal locking) }
  977.      LDF_ALL       =  (LDF_DEVICES+LDF_VOLUMES+LDF_ASSIGNS);
  978.  
  979. {    error report types for ErrorReport() }
  980.      REPORT_STREAM          = 0;       {    a stream }
  981.      REPORT_TASK            = 1;       {    a process - unused }
  982.      REPORT_LOCK            = 2;       {    a lock }
  983.      REPORT_VOLUME          = 3;       {    a volume node }
  984.      REPORT_INSERT          = 4;       {    please insert volume }
  985.  
  986. {    Special error codes for ErrorReport() }
  987.      ABORT_DISK_ERROR       = 296;     {    Read/write error }
  988.      ABORT_BUSY             = 288;     {    You MUST replace... }
  989.  
  990. {    types for initial packets to shells from run/newcli/execute/system. }
  991. {    For shell-writers only }
  992.      RUN_EXECUTE           =  -1;
  993.      RUN_SYSTEM            =  -2;
  994.      RUN_SYSTEM_ASYNCH     =  -3;
  995.  
  996. {    Types for fib_DirEntryType.  NOTE that both USERDIR and ROOT are      }
  997. {    directories, and that directory/file checks should use <0 and >=0.    }
  998. {    This is not necessarily exhaustive!  Some handlers may use other      }
  999. {    values as needed, though <0 and >=0 should remain as supported as     }
  1000. {    possible.                                                             }
  1001.      ST_ROOT       =  1 ;
  1002.      ST_USERDIR    =  2 ;
  1003.      ST_SOFTLINK   =  3 ;      {    looks like dir, but may point to a file! }
  1004.      ST_LINKDIR    =  4 ;      {    hard link to dir }
  1005.      ST_FILE       =  -3;      {    must be negative for FIB! }
  1006.      ST_LINKFILE   =  -4;      {    hard link to file }
  1007.      ST_PIPEFILE   =  -5;      {    for pipes that support ExamineFH   }
  1008.  
  1009. Type
  1010.  
  1011. { a lock structure, as returned by Lock() or DupLock() }
  1012.  
  1013.     pFileLock = ^tFileLock;
  1014.     tFileLock = record
  1015.         fl_Link         : BPTR;         { bcpl pointer to next lock }
  1016.         fl_Key          : Longint;      { disk block number }
  1017.         fl_Access       : Longint;      { exclusive or shared }
  1018.         fl_Task         : pMsgPort;     { handler task's port }
  1019.         fl_Volume       : BPTR;         { bptr to a DeviceList }
  1020.     end;
  1021.  
  1022.  
  1023. {  NOTE: V37 dos.library, when doing ExAll() emulation, and V37 filesystems  }
  1024. {  will return an error if passed ED_OWNER.  If you get ERROR_BAD_NUMBER,    }
  1025. {  retry with ED_COMMENT to get everything but owner info.  All filesystems  }
  1026. {  supporting ExAll() must support through ED_COMMENT, and must check Type   }
  1027. {  and return ERROR_BAD_NUMBER if they don't support the type.               }
  1028.  
  1029. {   values that can be passed for what data you want from ExAll() }
  1030. {   each higher value includes those below it (numerically)       }
  1031. {   you MUST chose one of these values }
  1032. CONST
  1033.      ED_NAME        = 1;
  1034.      ED_TYPE        = 2;
  1035.      ED_SIZE        = 3;
  1036.      ED_PROTECTION  = 4;
  1037.      ED_DATE        = 5;
  1038.      ED_COMMENT     = 6;
  1039.      ED_OWNER       = 7;
  1040. {
  1041.  *   Structure in which exall results are returned in.  Note that only the
  1042.  *   fields asked for will exist!
  1043.  }
  1044. Type
  1045.        pExAllData = ^tExAllData;
  1046.        tExAllData = record
  1047.         ed_Next     : pExAllData;
  1048.         ed_Name     : STRPTR;
  1049.         ed_Type,
  1050.         ed_Size,
  1051.         ed_Prot,
  1052.         ed_Days,
  1053.         ed_Mins,
  1054.         ed_Ticks    : ULONG;
  1055.         ed_Comment  : STRPTR;     {   strings will be after last used field }
  1056.         ed_OwnerUID,              { new for V39 }
  1057.         ed_OwnerGID : Word;
  1058.        END;
  1059.  
  1060. {
  1061.  *   Control structure passed to ExAll.  Unused fields MUST be initialized to
  1062.  *   0, expecially eac_LastKey.
  1063.  *
  1064.  *   eac_MatchFunc is a hook (see utility.library documentation for usage)
  1065.  *   It should return true if the entry is to returned, false if it is to be
  1066.  *   ignored.
  1067.  *
  1068.  *   This structure MUST be allocated by AllocDosObject()!
  1069.  }
  1070.  
  1071.        pExAllControl = ^tExAllControl;
  1072.        tExAllControl = record
  1073.         eac_Entries,                 {   number of entries returned in buffer      }
  1074.         eac_LastKey     : ULONG;     {   Don't touch inbetween linked ExAll calls! }
  1075.         eac_MatchString : STRPTR;    {   wildcard string for pattern match OR NULL }
  1076.         eac_MatchFunc   : pHook;     {   optional private wildcard FUNCTION     }
  1077.        END;
  1078.  
  1079.  
  1080.  
  1081. { The disk "environment" is a longword array that describes the
  1082.  * disk geometry.  It is variable sized, with the length at the beginning.
  1083.  * Here are the constants for a standard geometry.
  1084. }
  1085.  
  1086. Type
  1087.  
  1088.     pDosEnvec = ^tDosEnvec;
  1089.     tDosEnvec = record
  1090.         de_TableSize      : ULONG;      { Size of Environment vector }
  1091.         de_SizeBlock      : ULONG;      { in longwords: standard value is 128 }
  1092.         de_SecOrg         : ULONG;      { not used; must be 0 }
  1093.         de_Surfaces       : ULONG;      { # of heads (surfaces). drive specific }
  1094.         de_SectorPerBlock : ULONG;      { not used; must be 1 }
  1095.         de_BlocksPerTrack : ULONG;      { blocks per track. drive specific }
  1096.         de_Reserved       : ULONG;      { DOS reserved blocks at start of partition. }
  1097.         de_PreAlloc       : ULONG;      { DOS reserved blocks at end of partition }
  1098.         de_Interleave     : ULONG;      { usually 0 }
  1099.         de_LowCyl         : ULONG;      { starting cylinder. typically 0 }
  1100.         de_HighCyl        : ULONG;      { max cylinder. drive specific }
  1101.         de_NumBuffers     : ULONG;      { Initial # DOS of buffers.  }
  1102.         de_BufMemType     : ULONG;      { type of mem to allocate for buffers }
  1103.         de_MaxTransfer    : ULONG;      { Max number of bytes to transfer at a time }
  1104.         de_Mask           : ULONG;      { Address Mask to block out certain memory }
  1105.         de_BootPri        : Longint;    { Boot priority for autoboot }
  1106.         de_DosType        : ULONG;      { ASCII (HEX) string showing filesystem type;
  1107.                                         * 0X444F5300 is old filesystem,
  1108.                                         * 0X444F5301 is fast file system }
  1109.         de_Baud           : ULONG;      {     Baud rate for serial handler }
  1110.         de_Control        : ULONG;      {     Control Integer for handler/filesystem }
  1111.         de_BootBlocks     : ULONG;      {     Number of blocks containing boot code }
  1112.     end;
  1113.  
  1114. Const
  1115.  
  1116. { these are the offsets into the array }
  1117.  
  1118.     DE_TABLESIZE        = 0;    { standard value is 11 }
  1119.     DE_SIZEBLOCK        = 1;    { in longwords: standard value is 128 }
  1120.     DE_SECORG           = 2;    { not used; must be 0 }
  1121.     DE_NUMHEADS         = 3;    { # of heads (surfaces). drive specific }
  1122.     DE_SECSPERBLK       = 4;    { not used; must be 1 }
  1123.     DE_BLKSPERTRACK     = 5;    { blocks per track. drive specific }
  1124.     DE_RESERVEDBLKS     = 6;    { unavailable blocks at start.   usually 2 }
  1125.     DE_PREFAC           = 7;    { not used; must be 0 }
  1126.     DE_INTERLEAVE       = 8;    { usually 0 }
  1127.     DE_LOWCYL           = 9;    { starting cylinder. typically 0 }
  1128.     DE_UPPERCYL         = 10;   { max cylinder.  drive specific }
  1129.     DE_NUMBUFFERS       = 11;   { starting # of buffers.  typically 5 }
  1130.     DE_MEMBUFTYPE       = 12;   { type of mem to allocate for buffers. }
  1131.     DE_BUFMEMTYPE       = 12;   { same as above, better name
  1132.                                  * 1 is public, 3 is chip, 5 is fast }
  1133.     DE_MAXTRANSFER      = 13;   { Max number bytes to transfer at a time }
  1134.     DE_MASK             = 14;   { Address Mask to block out certain memory }
  1135.     DE_BOOTPRI          = 15;   { Boot priority for autoboot }
  1136.     DE_DOSTYPE          = 16;   { ASCII (HEX) string showing filesystem type;
  1137.                                  * 0X444F5300 is old filesystem,
  1138.                                  * 0X444F5301 is fast file system }
  1139.     DE_BAUD             = 17;   {     Baud rate for serial handler }
  1140.     DE_CONTROL          = 18;   {     Control Integer for handler/filesystem }
  1141.     DE_BOOTBLOCKS       = 19;   {     Number of blocks containing boot code }
  1142.  
  1143.  
  1144. { The file system startup message is linked into a device node's startup
  1145. ** field.  It contains a pointer to the above environment, plus the
  1146. ** information needed to do an exec OpenDevice().
  1147. }
  1148.  
  1149. Type
  1150.  
  1151.     pFileSysStartupMsg = ^tFileSysStartupMsg;
  1152.     tFileSysStartupMsg = record
  1153.         fssm_Unit       : ULONG;        { exec unit number for this device }
  1154.         fssm_Device     : BSTR;         { null terminated bstring to the device name }
  1155.         fssm_Environ    : BPTR;         { ptr to environment table (see above) }
  1156.         fssm_Flags      : ULONG;        { flags for OpenDevice() }
  1157.     end;
  1158.  
  1159.  
  1160. { The include file "libraries/dosextens.h" has a DeviceList structure.
  1161.  * The "device list" can have one of three different things linked onto
  1162.  * it.  Dosextens defines the structure for a volume.  DLT_DIRECTORY
  1163.  * is for an assigned directory.  The following structure is for
  1164.  * a dos "device" (DLT_DEVICE).
  1165. }
  1166.  
  1167.     pDeviceNode = ^tDeviceNode;
  1168.     tDeviceNode = record
  1169.         dn_Next         : BPTR;         { singly linked list }
  1170.         dn_Type         : ULONG;        { always 0 for dos "devices" }
  1171.         dn_Task         : pMsgPort;     { standard dos "task" field.  If this is
  1172.                                          * null when the node is accesses, a task
  1173.                                          * will be started up }
  1174.         dn_Lock         : BPTR;         { not used for devices -- leave null }
  1175.         dn_Handler      : BSTR;         { filename to loadseg (if seglist is null) }
  1176.         dn_StackSize    : ULONG;        { stacksize to use when starting task }
  1177.         dn_Priority     : Longint;      { task priority when starting task }
  1178.         dn_Startup      : BPTR;         { startup msg: FileSysStartupMsg for disks }
  1179.         dn_SegList      : BPTR;         { code to run to start new task (if necessary).
  1180.                                          * if null then dn_Handler will be loaded. }
  1181.         dn_GlobalVec    : BPTR; { BCPL global vector to use when starting
  1182.                                  * a task.  -1 means that dn_SegList is not
  1183.                                  * for a bcpl program, so the dos won't
  1184.                                  * try and construct one.  0 tell the
  1185.                                  * dos that you obey BCPL linkage rules,
  1186.                                  * and that it should construct a global
  1187.                                  * vector for you.
  1188.                                  }
  1189.         dn_Name         : BSTR;         { the node name, e.g. '\3','D','F','3' }
  1190.     end;
  1191.  
  1192. CONST
  1193. {     use of Class and code is discouraged for the time being - we might want to
  1194.    change things }
  1195. {     --- NotifyMessage Class ------------------------------------------------ }
  1196.      NOTIFY_CLASS  =  $40000000;
  1197.  
  1198. {     --- NotifyMessage Codes ------------------------------------------------ }
  1199.      NOTIFY_CODE   =  $1234;
  1200.  
  1201.  
  1202. {     Sent to the application if SEND_MESSAGE is specified.                    }
  1203.  
  1204. Type
  1205. {     Do not modify or reuse the notifyrequest while active.                   }
  1206. {     note: the first LONG of nr_Data has the length transfered                }
  1207.  
  1208.  
  1209.        pNotifyRequest = ^tNotifyRequest;
  1210.        tNotifyRequest = record
  1211.             nr_Name : pchar;
  1212.             nr_FullName : pchar;
  1213.             nr_UserData : ULONG;
  1214.             nr_Flags : ULONG;
  1215.             nr_stuff : record
  1216.                 case integer of
  1217.                    0 : ( nr_Msg : record
  1218.                         nr_Port : pMsgPort;
  1219.                      end );
  1220.                    1 : ( nr_Signal : record
  1221.                         nr_Task : pTask;
  1222.                         nr_SignalNum : BYTE;
  1223.                         nr_pad : array[0..2] of BYTE;
  1224.                      end );
  1225.                 end;
  1226.             nr_Reserved : array[0..3] of ULONG;
  1227.             nr_MsgCount : ULONG;
  1228.             nr_Handler : pMsgPort;
  1229.          end;
  1230.  
  1231.    pNotifyMessage = ^tNotifyMessage;
  1232.    tNotifyMessage = record
  1233.     nm_ExecMessage : tMessage;
  1234.     nm_Class       : ULONG;
  1235.     nm_Code        : Word;
  1236.     nm_NReq        : pNotifyRequest;     {     don't modify the request! }
  1237.     nm_DoNotTouch,                       {     like it says!  For use by handlers }
  1238.     nm_DoNotTouch2 : ULONG;            {     ditto }
  1239.    END;
  1240.  
  1241.  
  1242. CONST
  1243. {     --- NotifyRequest Flags ------------------------------------------------ }
  1244.      NRF_SEND_MESSAGE      =  1 ;
  1245.      NRF_SEND_SIGNAL       =  2 ;
  1246.      NRF_WAIT_REPLY        =  8 ;
  1247.      NRF_NOTIFY_INITIAL    =  16;
  1248.  
  1249. {     do NOT set or remove NRF_MAGIC!  Only for use by handlers! }
  1250.      NRF_MAGIC             = $80000000;
  1251.  
  1252. {     bit numbers }
  1253.      NRB_SEND_MESSAGE      =  0;
  1254.      NRB_SEND_SIGNAL       =  1;
  1255.      NRB_WAIT_REPLY        =  3;
  1256.      NRB_NOTIFY_INITIAL    =  4;
  1257.  
  1258.      NRB_MAGIC             =  31;
  1259.  
  1260. {     Flags reserved for private use by the handler: }
  1261.      NR_HANDLER_FLAGS      =  $ffff0000;
  1262.  
  1263. {   *********************************************************************
  1264.  *
  1265.  * The CSource data structure defines the input source for "ReadItem()"
  1266.  * as well as the ReadArgs call.  It is a publicly defined structure
  1267.  * which may be used by applications which use code that follows the
  1268.  * conventions defined for access.
  1269.  *
  1270.  * When passed to the dos.library functions, the value passed as
  1271.  * struct *CSource is defined as follows:
  1272.  *      if ( CSource == 0)      Use buffered IO "ReadChar()" as data source
  1273.  *      else                    Use CSource for input character stream
  1274.  *
  1275.  * The following two pseudo-code routines define how the CSource structure
  1276.  * is used:
  1277.  *
  1278.  * long CS_ReadChar( struct CSource *CSource )
  1279.  *
  1280.  *      if ( CSource == 0 )     return ReadChar();
  1281.  *      if ( CSource->CurChr >= CSource->Length )       return ENDSTREAMCHAR;
  1282.  *      return CSource->Buffer[ CSource->CurChr++ ];
  1283.  *
  1284.  *
  1285.  * BOOL CS_UnReadChar( struct CSource *CSource )
  1286.  *
  1287.  *      if ( CSource == 0 )     return UnReadChar();
  1288.  *      if ( CSource->CurChr <= 0 )     return FALSE;
  1289.  *      CSource->CurChr--;
  1290.  *      return TRUE;
  1291.  *
  1292.  *
  1293.  * To initialize a struct CSource, you set CSource->CS_Buffer to
  1294.  * a string which is used as the data source, and set CS_Length to
  1295.  * the number of characters in the string.  Normally CS_CurChr should
  1296.  * be initialized to ZERO, or left as it was from prior use as
  1297.  * a CSource.
  1298.  *
  1299.  *********************************************************************}
  1300.  
  1301. Type
  1302.        pCSource = ^tCSource;
  1303.        tCSource = record
  1304.         CS_Buffer  : STRPTR;
  1305.         CS_Length,
  1306.         CS_CurChr  : Longint;
  1307.        END;
  1308.  
  1309. {   *********************************************************************
  1310.  *
  1311.  * The RDArgs data structure is the input parameter passed to the DOS
  1312.  * ReadArgs() function call.
  1313.  *
  1314.  * The RDA_Source structure is a CSource as defined above;
  1315.  * if RDA_Source.CS_Buffer is non-null, RDA_Source is used as the input
  1316.  * character stream to parse, else the input comes from the buffered STDIN
  1317.  * calls ReadChar/UnReadChar.
  1318.  *
  1319.  * RDA_DAList is a private address which is used internally to track
  1320.  * allocations which are freed by FreeArgs().  This MUST be initialized
  1321.  * to NULL prior to the first call to ReadArgs().
  1322.  *
  1323.  * The RDA_Buffer and RDA_BufSiz fields allow the application to supply
  1324.  * a fixed-size buffer in which to store the parsed data.  This allows
  1325.  * the application to pre-allocate a buffer rather than requiring buffer
  1326.  * space to be allocated.  If either RDA_Buffer or RDA_BufSiz is NULL,
  1327.  * the application has not supplied a buffer.
  1328.  *
  1329.  * RDA_ExtHelp is a text string which will be displayed instead of the
  1330.  * template string, if the user is prompted for input.
  1331.  *
  1332.  * RDA_Flags bits control how ReadArgs() works.  The flag bits are
  1333.  * defined below.  Defaults are initialized to ZERO.
  1334.  *
  1335.  *********************************************************************}
  1336.  
  1337.        pRDArgs = ^tRDArgs;
  1338.        tRDArgs = record
  1339.         RDA_Source  : tCSource;     {    Select input source }
  1340.         RDA_DAList  : Longint;      {    PRIVATE. }
  1341.         RDA_Buffer  : STRPTR;       {    Optional string parsing space. }
  1342.         RDA_BufSiz  : Longint;      {    Size of RDA_Buffer (0..n) }
  1343.         RDA_ExtHelp : STRPTR;       {    Optional extended help }
  1344.         RDA_Flags   : Longint;      {    Flags for any required control }
  1345.        END;
  1346.  
  1347. CONST
  1348.        RDAB_STDIN     = 0;       {    Use "STDIN" rather than "COMMAND LINE" }
  1349.        RDAF_STDIN     = 1;
  1350.        RDAB_NOALLOC   = 1;       {    If set, do not allocate extra string space.}
  1351.        RDAF_NOALLOC   = 2;
  1352.        RDAB_NOPROMPT  = 2;       {    Disable reprompting for string input. }
  1353.        RDAF_NOPROMPT  = 4;
  1354.  
  1355. {   *********************************************************************
  1356.  * Maximum number of template keywords which can be in a template passed
  1357.  * to ReadArgs(). IMPLEMENTOR NOTE - must be a multiple of 4.
  1358.  *********************************************************************}
  1359.        MAX_TEMPLATE_ITEMS     = 100;
  1360.  
  1361. {   *********************************************************************
  1362.  * Maximum number of MULTIARG items returned by ReadArgs(), before
  1363.  * an ERROR_LINE_TOO_LONG.  These two limitations are due to stack
  1364.  * usage.  Applications should allow "a lot" of stack to use ReadArgs().
  1365.  *********************************************************************}
  1366.        MAX_MULTIARGS          = 128;
  1367.  
  1368. CONST
  1369. {     Modes for LockRecord/LockRecords() }
  1370.        REC_EXCLUSIVE          = 0;
  1371.        REC_EXCLUSIVE_IMMED    = 1;
  1372.        REC_SHARED             = 2;
  1373.        REC_SHARED_IMMED       = 3;
  1374.  
  1375. {     struct to be passed to LockRecords()/UnLockRecords() }
  1376.  
  1377. Type
  1378.        pRecordLock = ^tRecordLock;
  1379.        tRecordLock = record
  1380.         rec_FH    : BPTR;         {     filehandle }
  1381.         rec_Offset,               {     offset in file }
  1382.         rec_Length,               {     length of file to be locked }
  1383.         rec_Mode  : ULONG;        {     Type of lock }
  1384.        END;
  1385.  
  1386.  
  1387. {      the structure in the pr_LocalVars list }
  1388. {      Do NOT allocate yourself, use SetVar()!!! This structure may grow in }
  1389. {      future releases!  The list should be left in alphabetical order, and }
  1390. {      may have multiple entries with the same name but different types.    }
  1391. Type
  1392.        pLocalVar = ^tLocalVar;
  1393.        tLocalVar = record
  1394.         lv_Node  : tNode;
  1395.         lv_Flags : Word;
  1396.         lv_Value : STRPTR;
  1397.         lv_Len   : ULONG;
  1398.        END;
  1399.  
  1400. {
  1401.  * The lv_Flags bits are available to the application.  The unused
  1402.  * lv_Node.ln_Pri bits are reserved for system use.
  1403.  }
  1404.  
  1405. CONST
  1406. {      bit definitions for lv_Node.ln_Type: }
  1407.        LV_VAR               =   0;       {      an variable }
  1408.        LV_ALIAS             =   1;       {      an alias }
  1409. {      to be or'ed into type: }
  1410.        LVB_IGNORE           =   7;       {      ignore this entry on GetVar, etc }
  1411.        LVF_IGNORE           =   $80;
  1412.  
  1413. {      definitions of flags passed to GetVar()/SetVar()/DeleteVar() }
  1414. {      bit defs to be OR'ed with the type: }
  1415. {      item will be treated as a single line of text unless BINARY_VAR is used }
  1416.        GVB_GLOBAL_ONLY       =  8   ;
  1417.        GVF_GLOBAL_ONLY       =  $100;
  1418.        GVB_LOCAL_ONLY        =  9   ;
  1419.        GVF_LOCAL_ONLY        =  $200;
  1420.        GVB_BINARY_VAR        =  10  ;            {      treat variable as binary }
  1421.        GVF_BINARY_VAR        =  $400;
  1422.        GVB_DONT_NULL_TERM    =  11;            { only with GVF_BINARY_VAR }
  1423.        GVF_DONT_NULL_TERM    =  $800;
  1424.  
  1425. { this is only supported in >= V39 dos.  V37 dos ignores this. }
  1426. { this causes SetVar to affect ENVARC: as well as ENV:.        }
  1427.       GVB_SAVE_VAR           = 12 ;     { only with GVF_GLOBAL_VAR }
  1428.       GVF_SAVE_VAR           = $1000 ;
  1429.  
  1430.  
  1431. CONST
  1432. {   ***************************************************************************}
  1433. {    definitions for the System() call }
  1434.  
  1435.     SYS_Dummy      = (TAG_USER + 32);
  1436.     SYS_Input      = (SYS_Dummy + 1);
  1437.                                 {    specifies the input filehandle  }
  1438.     SYS_Output     = (SYS_Dummy + 2);
  1439.                                 {    specifies the output filehandle }
  1440.     SYS_Asynch     = (SYS_Dummy + 3);
  1441.                                 {    run asynch, close input/output on exit(!) }
  1442.     SYS_UserShell  = (SYS_Dummy + 4);
  1443.                                 {    send to user shell instead of boot shell }
  1444.     SYS_CustomShell= (SYS_Dummy + 5);
  1445.                                 {    send to a specific shell (data is name) }
  1446. {         SYS_Error, }
  1447.  
  1448.  
  1449. {   ***************************************************************************}
  1450. {    definitions for the CreateNewProc() call }
  1451. {    you MUST specify one of NP_Seglist or NP_Entry.  All else is optional. }
  1452.  
  1453.     NP_Dummy       = (TAG_USER + 1000);
  1454.     NP_Seglist     = (NP_Dummy + 1);
  1455.                                 {    seglist of code to run for the process  }
  1456.     NP_FreeSeglist = (NP_Dummy + 2);
  1457.                                 {    free seglist on exit - only valid for   }
  1458.                                 {    for NP_Seglist.  Default is TRUE.       }
  1459.     NP_Entry       = (NP_Dummy + 3);
  1460.                                 {    entry point to run - mutually exclusive }
  1461.                                 {    with NP_Seglist! }
  1462.     NP_Input       = (NP_Dummy + 4);
  1463.                                 {    filehandle - default is Open("NIL:"...) }
  1464.     NP_Output      = (NP_Dummy + 5);
  1465.                                 {    filehandle - default is Open("NIL:"...) }
  1466.     NP_CloseInput  = (NP_Dummy + 6);
  1467.                                 {    close input filehandle on exit          }
  1468.                                 {    default TRUE                            }
  1469.     NP_CloseOutput = (NP_Dummy + 7);
  1470.                                 {    close output filehandle on exit         }
  1471.                                 {    default TRUE                            }
  1472.     NP_Error       = (NP_Dummy + 8);
  1473.                                 {    filehandle - default is Open("NIL:"...) }
  1474.     NP_CloseError  = (NP_Dummy + 9);
  1475.                                 {    close error filehandle on exit          }
  1476.                                 {    default TRUE                            }
  1477.     NP_CurrentDir  = (NP_Dummy + 10);
  1478.                                 {    lock - default is parent's current dir  }
  1479.     NP_StackSize   = (NP_Dummy + 11);
  1480.                                 {    stacksize for process - default 4000    }
  1481.     NP_Name        = (NP_Dummy + 12);
  1482.                                 {    name for process - default "New Process"}
  1483.     NP_Priority    = (NP_Dummy + 13);
  1484.                                 {    priority - default same as parent       }
  1485.     NP_ConsoleTask = (NP_Dummy + 14);
  1486.                                 {    consoletask - default same as parent    }
  1487.     NP_WindowPtr   = (NP_Dummy + 15);
  1488.                                 {    window ptr - default is same as parent  }
  1489.     NP_HomeDir     = (NP_Dummy + 16);
  1490.                                 {    home directory - default curr home dir  }
  1491.     NP_CopyVars    = (NP_Dummy + 17);
  1492.                                 {    boolean to copy local vars-default TRUE }
  1493.     NP_Cli         = (NP_Dummy + 18);
  1494.                                 {    create cli structure - default FALSE    }
  1495.     NP_Path        = (NP_Dummy + 19);
  1496.                                 {    path - default is copy of parents path  }
  1497.                                 {    only valid if a cli process!    }
  1498.     NP_CommandName = (NP_Dummy + 20);
  1499.                                 {    commandname - valid only for CLI        }
  1500.     NP_Arguments   = (NP_Dummy + 21);
  1501.                                 {    cstring of arguments - passed with str  }
  1502.                                 {    in a0, length in d0.  (copied and freed }
  1503.                                 {    on exit.  Default is empty string.      }
  1504.                                 {    NOTE: not operational until 2.04 - see  }
  1505.                                 {    BIX/TechNotes for more info/workarounds }
  1506.                                 {    NOTE: in 2.0, it DIDN'T pass "" - the   }
  1507.                                 {    registers were random.                  }
  1508. {    FIX! should this be only for cli's? }
  1509.     NP_NotifyOnDeath = (NP_Dummy + 22);
  1510.                                 {    notify parent on death - default FALSE  }
  1511.                                 {    Not functional yet. }
  1512.     NP_Synchronous   = (NP_Dummy + 23);
  1513.                                 {    don't return until process finishes -   }
  1514.                                 {    default FALSE.                          }
  1515.                                 {    Not functional yet. }
  1516.     NP_ExitCode      = (NP_Dummy + 24);
  1517.                                 {    code to be called on process exit       }
  1518.     NP_ExitData      = (NP_Dummy + 25);
  1519.                                 {    optional argument for NP_EndCode rtn -  }
  1520.                                 {    default NULL                            }
  1521.  
  1522.  
  1523. {   ***************************************************************************}
  1524. {    tags for AllocDosObject }
  1525.  
  1526.     ADO_Dummy        = (TAG_USER + 2000);
  1527.     ADO_FH_Mode      = (ADO_Dummy + 1);
  1528.                                 {    for type DOS_FILEHANDLE only            }
  1529.                                 {    sets up FH for mode specified.
  1530.                                    This can make a big difference for buffered
  1531.                                    files.                                  }
  1532.         {    The following are for DOS_CLI }
  1533.         {    If you do not specify these, dos will use it's preferred values }
  1534.         {    which may change from release to release.  The BPTRs to these   }
  1535.         {    will be set up correctly for you.  Everything will be zero,     }
  1536.         {    except cli_FailLevel (10) and cli_Background (DOSTRUE).         }
  1537.         {    NOTE: you may also use these 4 tags with CreateNewProc.         }
  1538.  
  1539.     ADO_DirLen     = (ADO_Dummy + 2);
  1540.                                 {    size in bytes for current dir buffer    }
  1541.     ADO_CommNameLen= (ADO_Dummy + 3);
  1542.                                 {    size in bytes for command name buffer   }
  1543.     ADO_CommFileLen= (ADO_Dummy + 4);
  1544.                                 {    size in bytes for command file buffer   }
  1545.     ADO_PromptLen  = (ADO_Dummy + 5);
  1546.                                 {    size in bytes for the prompt buffer     }
  1547.  
  1548. {   ***************************************************************************}
  1549. {    tags for NewLoadSeg }
  1550. {    no tags are defined yet for NewLoadSeg }
  1551.  
  1552.  
  1553. PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket);
  1554. FUNCTION AddBuffers(name : pCHAR; number : LONGINT) : BOOLEAN;
  1555. FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN;
  1556. FUNCTION AddPart(dirname : pCHAR; filename : pCHAR; size : ULONG) : BOOLEAN;
  1557. FUNCTION AddSegment(name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN;
  1558. FUNCTION AllocDosObject(type_ : ULONG; tags : pTagItem) : POINTER;
  1559. FUNCTION AllocDosObjectTagList(type_ : ULONG; tags : pTagItem) : POINTER;
  1560. FUNCTION AssignAdd(name : pCHAR; lock : LONGINT) : BOOLEAN;
  1561. FUNCTION AssignLate(name : pCHAR; path : pCHAR) : BOOLEAN;
  1562. FUNCTION AssignLock(name : pCHAR; lock : LONGINT) : BOOLEAN;
  1563. FUNCTION AssignPath(name : pCHAR; path : pCHAR) : BOOLEAN;
  1564. FUNCTION AttemptLockDosList(flags : ULONG) : pDosList;
  1565. FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN;
  1566. FUNCTION CheckSignal(mask : LONGINT) : LONGINT;
  1567. FUNCTION Cli : pCommandLineInterface;
  1568. FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT;
  1569. FUNCTION CliInitRun(dp : pDosPacket) : LONGINT;
  1570. FUNCTION CompareDates(date1 : pDateStamp; date2 : pDateStamp) : LONGINT;
  1571. FUNCTION CreateDir(name : pCHAR) : LONGINT;
  1572. FUNCTION CreateNewProc(tags : pTagItem) : pProcess;
  1573. FUNCTION CreateNewProcTagList(tags : pTagItem) : pProcess;
  1574. FUNCTION CreateProc(name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort;
  1575. FUNCTION CurrentDir(lock : LONGINT) : LONGINT;
  1576. PROCEDURE DateStamp(VAR date : pDateStamp);
  1577. FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN;
  1578. FUNCTION DeleteFile(name : pCHAR) : BOOLEAN;
  1579. FUNCTION DeleteVar(name : pCHAR; flags : ULONG) : BOOLEAN;
  1580. FUNCTION DeviceProc(name : pCHAR) : pMsgPort;
  1581. FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT;
  1582. FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT;
  1583. FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT;
  1584. FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT;
  1585. FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT;
  1586. FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT;
  1587. PROCEDURE DOSClose(file_ : LONGINT);
  1588. PROCEDURE DOSDelay(timeout : LONGINT);
  1589. PROCEDURE DOSExit(returnCode : LONGINT);
  1590. FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN;
  1591. FUNCTION DOSInput : LONGINT;
  1592. FUNCTION DOSOpen(name : pCHAR; accessMode : LONGINT) : LONGINT;
  1593. FUNCTION DOSOutput : LONGINT;
  1594. FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT;
  1595. FUNCTION DOSRename(oldName : pCHAR; newName : pCHAR) : LONGINT;
  1596. FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT;
  1597. FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT;
  1598. FUNCTION DupLock(lock : LONGINT) : LONGINT;
  1599. FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT;
  1600. PROCEDURE EndNotify(notify : pNotifyRequest);
  1601. FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN;
  1602. FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN;
  1603. PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl);
  1604. FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN;
  1605. FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN;
  1606. FUNCTION Execute(string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN;
  1607. FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN;
  1608. FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  1609. FUNCTION FGetC(fh : LONGINT) : LONGINT;
  1610. FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR;
  1611. FUNCTION FilePart(path : pCHAR) : pCHAR;
  1612. FUNCTION FindArg(keyword : pCHAR; arg_template : pCHAR) : LONGINT;
  1613. FUNCTION FindCliProc(num : ULONG) : pProcess;
  1614. FUNCTION FindDosEntry(dlist : pDosList; name : pCHAR; flags : ULONG) : pDosList;
  1615. FUNCTION FindSegment(name : pCHAR; seg : pSegment; system : LONGINT) : pSegment;
  1616. FUNCTION FindVar(name : pCHAR; type_ : ULONG) : pLocalVar;
  1617. FUNCTION Format(filesystem : pCHAR; volumename : pCHAR; dostype : ULONG) : BOOLEAN;
  1618. FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT;
  1619. FUNCTION FPuts(fh : LONGINT; str : pCHAR) : BOOLEAN;
  1620. FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT;
  1621. PROCEDURE FreeArgs(args : pRDArgs);
  1622. PROCEDURE FreeDeviceProc(dp : pDevProc);
  1623. PROCEDURE FreeDosEntry(dlist : pDosList);
  1624. PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER);
  1625. FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT;
  1626. FUNCTION GetArgStr : pCHAR;
  1627. FUNCTION GetConsoleTask : pMsgPort;
  1628. FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN;
  1629. FUNCTION GetDeviceProc(name : pCHAR; dp : pDevProc) : pDevProc;
  1630. FUNCTION GetFileSysTask : pMsgPort;
  1631. FUNCTION GetProgramDir : LONGINT;
  1632. FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN;
  1633. FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN;
  1634. FUNCTION GetVar(name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT;
  1635. FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN;
  1636. FUNCTION Inhibit(name : pCHAR; onoff : LONGINT) : BOOLEAN;
  1637. FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT; VAR funcarray : LONGINT; VAR stack : LONGINT) : LONGINT;
  1638. FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN;
  1639. FUNCTION IoErr : LONGINT;
  1640. FUNCTION IsFileSystem(name : pCHAR) : BOOLEAN;
  1641. FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN;
  1642. FUNCTION LoadSeg(name : pCHAR) : LONGINT;
  1643. FUNCTION Lock(name : pCHAR; type_ : LONGINT) : LONGINT;
  1644. FUNCTION LockDosList(flags : ULONG) : pDosList;
  1645. FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN;
  1646. FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN;
  1647. FUNCTION MakeDosEntry(name : pCHAR; type_ : LONGINT) : pDosList;
  1648. FUNCTION MakeLink(name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN;
  1649. PROCEDURE MatchEnd(anchor : pAnchorPath);
  1650. FUNCTION MatchFirst(pat : pCHAR; anchor : pAnchorPath) : LONGINT;
  1651. FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT;
  1652. FUNCTION MatchPattern(pat : pCHAR; str : pCHAR) : BOOLEAN;
  1653. FUNCTION MatchPatternNoCase(pat : pCHAR; str : pCHAR) : BOOLEAN;
  1654. FUNCTION MaxCli : ULONG;
  1655. FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  1656. FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  1657. FUNCTION NewLoadSeg(file_ : pCHAR; tags : pTagItem) : LONGINT;
  1658. FUNCTION NewLoadSegTagList(file_ : pCHAR; tags : pTagItem) : LONGINT;
  1659. FUNCTION NextDosEntry(dlist : pDosList; flags : ULONG) : pDosList;
  1660. FUNCTION OpenFromLock(lock : LONGINT) : LONGINT;
  1661. FUNCTION ParentDir(lock : LONGINT) : LONGINT;
  1662. FUNCTION ParentOfFH(fh : LONGINT) : LONGINT;
  1663. FUNCTION ParsePattern(pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT;
  1664. FUNCTION ParsePatternNoCase(pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT;
  1665. FUNCTION PathPart(path : pCHAR) : pCHAR;
  1666. FUNCTION PrintFault(code : LONGINT; header : pCHAR) : BOOLEAN;
  1667. FUNCTION PutStr(str : pCHAR) : BOOLEAN;
  1668. FUNCTION ReadArgs(arg_template : pCHAR; var arra : pLONGINT; args : pRDArgs) : pRDArgs;
  1669. FUNCTION ReadItem(name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT;
  1670. FUNCTION ReadLink(port : pMsgPort; lock : LONGINT; path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN;
  1671. FUNCTION Relabel(drive : pCHAR; newname : pCHAR) : BOOLEAN;
  1672. FUNCTION RemAssignList(name : pCHAR; lock : LONGINT) : BOOLEAN;
  1673. FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN;
  1674. FUNCTION RemSegment(seg : pSegment) : BOOLEAN;
  1675. PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT);
  1676. FUNCTION RunCommand(seg : LONGINT; stack : LONGINT; paramptr : pCHAR; paramlen : LONGINT) : LONGINT;
  1677. FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN;
  1678. FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT;
  1679. FUNCTION SelectInput(fh : LONGINT) : LONGINT;
  1680. FUNCTION SelectOutput(fh : LONGINT) : LONGINT;
  1681. PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort);
  1682. FUNCTION SetArgStr(string_ : pCHAR) : BOOLEAN;
  1683. FUNCTION SetComment(name : pCHAR; comment : pCHAR) : BOOLEAN;
  1684. FUNCTION SetConsoleTask(task : pMsgPort) : pMsgPort;
  1685. FUNCTION SetCurrentDirName(name : pCHAR) : BOOLEAN;
  1686. FUNCTION SetFileDate(name : pCHAR; date : pDateStamp) : BOOLEAN;
  1687. FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN;
  1688. FUNCTION SetFileSysTask(task : pMsgPort) : pMsgPort;
  1689. FUNCTION SetIoErr(result : LONGINT) : LONGINT;
  1690. FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN;
  1691. FUNCTION SetOwner(name : pCHAR; owner_info : LONGINT) : BOOLEAN;
  1692. FUNCTION SetProgramDir(lock : LONGINT) : LONGINT;
  1693. FUNCTION SetProgramName(name : pCHAR) : BOOLEAN;
  1694. FUNCTION SetPrompt(name : pCHAR) : BOOLEAN;
  1695. FUNCTION SetProtection(name : pCHAR; protect : LONGINT) : BOOLEAN;
  1696. FUNCTION SetVar(name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
  1697. FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN;
  1698. FUNCTION SplitName(name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
  1699. FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN;
  1700. FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN;
  1701. FUNCTION StrToLong(string_ : pCHAR; VAR value : LONGINT) : LONGINT;
  1702. FUNCTION SystemTagList(command : pCHAR; tags : pTagItem) : LONGINT;
  1703. FUNCTION DOSSystem(command : pCHAR; tags : pTagItem) : LONGINT;
  1704. FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT;
  1705. PROCEDURE UnLoadSeg(seglist : LONGINT);
  1706. PROCEDURE UnLock(lock : LONGINT);
  1707. PROCEDURE UnLockDosList(flags : ULONG);
  1708. FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN;
  1709. FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN;
  1710. FUNCTION VFPrintf(fh : LONGINT; format : pCHAR; argarray : POINTER) : LONGINT;
  1711. PROCEDURE VFWritef(fh : LONGINT; format : pCHAR; VAR argarray : LONGINT);
  1712. FUNCTION VPrintf(format : pCHAR; argarray : POINTER) : LONGINT;
  1713. FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN;
  1714. FUNCTION WaitPkt : pDosPacket;
  1715. FUNCTION WriteChars(buf : pCHAR; buflen : ULONG) : LONGINT;
  1716.  
  1717. FUNCTION BADDR(bval :BPTR): POINTER;
  1718. FUNCTION MKBADDR(adr: Pointer): BPTR;
  1719.  
  1720. {$ifdef amiga_overlays}
  1721.  
  1722. FUNCTION AddBuffers(name : string; number : LONGINT) : BOOLEAN;
  1723. FUNCTION AddPart(dirname : string; filename : pCHAR; size : ULONG) : BOOLEAN;
  1724. FUNCTION AddPart(dirname : pCHAR; filename : string; size : ULONG) : BOOLEAN;
  1725. FUNCTION AddPart(dirname : string; filename : string; size : ULONG) : BOOLEAN;
  1726. FUNCTION AssignAdd(name : string; lock : LONGINT) : BOOLEAN;
  1727. FUNCTION AssignLate(name : string; path : pCHAR) : BOOLEAN;
  1728. FUNCTION AssignLate(name : pChar; path : string) : BOOLEAN;
  1729. FUNCTION AssignLate(name : string; path : string) : BOOLEAN;
  1730. FUNCTION AssignLock(name : string; lock : LONGINT) : BOOLEAN;
  1731. FUNCTION AssignPath(name : string; path : pCHAR) : BOOLEAN;
  1732. FUNCTION AssignPath(name : pCHAR; path : string) : BOOLEAN;
  1733. FUNCTION AssignPath(name : string; path : string) : BOOLEAN;
  1734. FUNCTION CreateDir(name : string) : LONGINT;
  1735. FUNCTION CreateProc(name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort;
  1736. FUNCTION DeleteFile(name : string) : BOOLEAN;
  1737. FUNCTION DeleteVar(name : string; flags : ULONG) : BOOLEAN;
  1738. FUNCTION DeviceProc(name : string) : pMsgPort;
  1739. FUNCTION DOSOpen(name : string; accessMode : LONGINT) : LONGINT;
  1740. FUNCTION DOSRename(oldName : string; newName : pChar) : LONGINT;
  1741. FUNCTION DOSRename(oldName : pCHAR; newName : string) : LONGINT;
  1742. FUNCTION DOSRename(oldName : string; newName : string) : LONGINT;
  1743. FUNCTION Execute(string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN;
  1744. FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  1745. FUNCTION FilePart(path : string) : pCHAR;
  1746. FUNCTION FindArg(keyword : string; arg_template : pCHAR) : LONGINT;
  1747. FUNCTION FindArg(keyword : pCHAR; arg_template : string) : LONGINT;
  1748. FUNCTION FindArg(keyword : string; arg_template : string) : LONGINT;
  1749. FUNCTION FindDosEntry(dlist : pDosList; name : string; flags : ULONG) : pDosList;
  1750. FUNCTION FindSegment(name : string; seg : pSegment; system : LONGINT) : pSegment;
  1751. FUNCTION FindVar(name : string; type_ : ULONG) : pLocalVar;
  1752. FUNCTION Format(filesystem : string; volumename : pCHAR; dostype : ULONG) : BOOLEAN;
  1753. FUNCTION Format(filesystem : pCHAR; volumename : string; dostype : ULONG) : BOOLEAN;
  1754. FUNCTION Format(filesystem : string; volumename : string; dostype : ULONG) : BOOLEAN;
  1755. FUNCTION FPuts(fh : LONGINT; str : string) : BOOLEAN;
  1756. FUNCTION GetDeviceProc(name : string; dp : pDevProc) : pDevProc;
  1757. FUNCTION GetVar(name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT;
  1758. FUNCTION Inhibit(name : string; onoff : LONGINT) : BOOLEAN;
  1759. FUNCTION IsFileSystem(name : string) : BOOLEAN;
  1760. FUNCTION LoadSeg(name : string) : LONGINT;
  1761. FUNCTION Lock(name : string; type_ : LONGINT) : LONGINT;
  1762. FUNCTION MakeDosEntry(name : string; type_ : LONGINT) : pDosList;
  1763. FUNCTION MakeLink(name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN;
  1764. FUNCTION MatchFirst(pat : string; anchor : pAnchorPath) : LONGINT;
  1765. FUNCTION MatchPattern(pat : string; str : pCHAR) : BOOLEAN;
  1766. FUNCTION MatchPattern(pat : pCHAR; str : string) : BOOLEAN;
  1767. FUNCTION MatchPattern(pat : string; str : string) : BOOLEAN;
  1768. FUNCTION MatchPatternNoCase(pat : string; str : pCHAR) : BOOLEAN;
  1769. FUNCTION MatchPatternNoCase(pat : pCHAR; str : string) : BOOLEAN;
  1770. FUNCTION MatchPatternNoCase(pat : string; str : string) : BOOLEAN;
  1771. FUNCTION NewLoadSeg(file_ : string; tags : pTagItem) : LONGINT;
  1772. FUNCTION NewLoadSegTagList(file_ : string; tags : pTagItem) : LONGINT;
  1773. FUNCTION PathPart(path : string) : pCHAR;
  1774. FUNCTION PrintFault(code : LONGINT; header : string) : BOOLEAN;
  1775. FUNCTION PutStr(str : string) : BOOLEAN;
  1776. FUNCTION ReadArgs(arg_template : string; var arra : pLONGINT; args : pRDArgs) : pRDArgs;
  1777. FUNCTION ReadItem(name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT;
  1778. FUNCTION ReadLink(port : pMsgPort; lock : LONGINT; path : string; buffer : pCHAR; size : ULONG) : BOOLEAN;
  1779. FUNCTION Relabel(drive : string; newname : pCHAR) : BOOLEAN;
  1780. FUNCTION Relabel(drive : pCHAR; newname : string) : BOOLEAN;
  1781. FUNCTION Relabel(drive : string; newname : string) : BOOLEAN;
  1782. FUNCTION RemAssignList(name : string; lock : LONGINT) : BOOLEAN;
  1783. FUNCTION RunCommand(seg : LONGINT; stack : LONGINT; paramptr : string; paramlen : LONGINT) : LONGINT;
  1784. FUNCTION SetArgStr(string_ : string) : BOOLEAN;
  1785. FUNCTION SetComment(name : string; comment : pCHAR) : BOOLEAN;
  1786. FUNCTION SetComment(name : pCHAR; comment : string) : BOOLEAN;
  1787. FUNCTION SetComment(name : string; comment : string) : BOOLEAN;
  1788. FUNCTION SetCurrentDirName(name : string) : BOOLEAN;
  1789. FUNCTION SetFileDate(name : string; date : pDateStamp) : BOOLEAN;
  1790. FUNCTION SetOwner(name : string; owner_info : LONGINT) : BOOLEAN;
  1791. FUNCTION SetProgramName(name : string) : BOOLEAN;
  1792. FUNCTION SetPrompt(name : string) : BOOLEAN;
  1793. FUNCTION SetProtection(name : string; protect : LONGINT) : BOOLEAN;
  1794. FUNCTION SetVar(name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
  1795. FUNCTION SplitName(name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
  1796. FUNCTION StrToLong(string_ : string; VAR value : LONGINT) : LONGINT;
  1797. FUNCTION SystemTagList(command : string; tags : pTagItem) : LONGINT;
  1798. FUNCTION DOSSystem(command : string; tags : pTagItem) : LONGINT;
  1799.  
  1800. {$endif}
  1801.  
  1802. IMPLEMENTATION
  1803.  
  1804. {$ifdef amiga_overlays}
  1805. uses pastoc;
  1806. {$endif}
  1807.  
  1808.  
  1809. FUNCTION BADDR(bval : BPTR): POINTER;
  1810. BEGIN
  1811.     BADDR := POINTER( bval shl 2);
  1812. END;
  1813.  
  1814. FUNCTION MKBADDR(adr : POINTER): BPTR;
  1815. BEGIN
  1816.     MKBADDR := BPTR( LONGINT(adr) shr 2);
  1817. END;
  1818.  
  1819. PROCEDURE AbortPkt(port : pMsgPort; pkt : pDosPacket);
  1820. BEGIN
  1821.   ASM
  1822.     MOVE.L  A6,-(A7)
  1823.     MOVE.L  port,D1
  1824.     MOVE.L  pkt,D2
  1825.     MOVEA.L _DOSBase,A6
  1826.     JSR -264(A6)
  1827.     MOVEA.L (A7)+,A6
  1828.   END;
  1829. END;
  1830.  
  1831. FUNCTION AddBuffers(name : pCHAR; number : LONGINT) : BOOLEAN;
  1832. BEGIN
  1833.   ASM
  1834.     MOVE.L  A6,-(A7)
  1835.     MOVE.L  name,D1
  1836.     MOVE.L  number,D2
  1837.     MOVEA.L _DOSBase,A6
  1838.     JSR -732(A6)
  1839.     MOVEA.L (A7)+,A6
  1840.     TST.L   D0
  1841.     BEQ.B   @end
  1842.     MOVEQ   #1,D0
  1843.     @end: MOVE.B  D0,@RESULT
  1844.   END;
  1845. END;
  1846.  
  1847. FUNCTION AddDosEntry(dlist : pDosList) : BOOLEAN;
  1848. BEGIN
  1849.   ASM
  1850.     MOVE.L  A6,-(A7)
  1851.     MOVE.L  dlist,D1
  1852.     MOVEA.L _DOSBase,A6
  1853.     JSR -678(A6)
  1854.     MOVEA.L (A7)+,A6
  1855.     TST.L   D0
  1856.     BEQ.B   @end
  1857.     MOVEQ   #1,D0
  1858.     @end: MOVE.B  D0,@RESULT
  1859.   END;
  1860. END;
  1861.  
  1862. FUNCTION AddPart(dirname : pCHAR; filename : pCHAR; size : ULONG) : BOOLEAN;
  1863. BEGIN
  1864.   ASM
  1865.     MOVE.L  A6,-(A7)
  1866.     MOVE.L  dirname,D1
  1867.     MOVE.L  filename,D2
  1868.     MOVE.L  size,D3
  1869.     MOVEA.L _DOSBase,A6
  1870.     JSR -882(A6)
  1871.     MOVEA.L (A7)+,A6
  1872.     TST.W   D0
  1873.     BEQ.B   @end
  1874.     MOVEQ   #1,D0
  1875.   @end: MOVE.B  D0,@RESULT
  1876.   END;
  1877. END;
  1878.  
  1879. FUNCTION AddSegment(name : pCHAR; seg : LONGINT; system : LONGINT) : BOOLEAN;
  1880. BEGIN
  1881.   ASM
  1882.     MOVE.L  A6,-(A7)
  1883.     MOVE.L  name,D1
  1884.     MOVE.L  seg,D2
  1885.     MOVE.L  system,D3
  1886.     MOVEA.L _DOSBase,A6
  1887.     JSR -774(A6)
  1888.     MOVEA.L (A7)+,A6
  1889.     TST.L   D0
  1890.     BEQ.B   @end
  1891.     MOVEQ   #1,D0
  1892.     @end: MOVE.B  D0,@RESULT
  1893.   END;
  1894. END;
  1895.  
  1896. FUNCTION AllocDosObject(type_ : ULONG; tags : pTagItem) : POINTER;
  1897. BEGIN
  1898.   ASM
  1899.     MOVE.L  A6,-(A7)
  1900.     MOVE.L  type_,D1
  1901.     MOVE.L  tags,D2
  1902.     MOVEA.L _DOSBase,A6
  1903.     JSR -228(A6)
  1904.     MOVEA.L (A7)+,A6
  1905.     MOVE.L  D0,@RESULT
  1906.   END;
  1907. END;
  1908.  
  1909. FUNCTION AllocDosObjectTagList(type_ : ULONG; tags : pTagItem) : POINTER;
  1910. BEGIN
  1911.   ASM
  1912.     MOVE.L  A6,-(A7)
  1913.     MOVE.L  type_,D1
  1914.     MOVE.L  tags,D2
  1915.     MOVEA.L _DOSBase,A6
  1916.     JSR -228(A6)
  1917.     MOVEA.L (A7)+,A6
  1918.     MOVE.L  D0,@RESULT
  1919.   END;
  1920. END;
  1921.  
  1922. FUNCTION AssignAdd(name : pCHAR; lock : LONGINT) : BOOLEAN;
  1923. BEGIN
  1924.   ASM
  1925.     MOVE.L  A6,-(A7)
  1926.     MOVE.L  name,D1
  1927.     MOVE.L  lock,D2
  1928.     MOVEA.L _DOSBase,A6
  1929.     JSR -630(A6)
  1930.     MOVEA.L (A7)+,A6
  1931.     TST.W   D0
  1932.     BEQ.B   @end
  1933.     MOVEQ   #1,D0
  1934.   @end: MOVE.B  D0,@RESULT
  1935.   END;
  1936. END;
  1937.  
  1938. FUNCTION AssignLate(name : pCHAR; path : pCHAR) : BOOLEAN;
  1939. BEGIN
  1940.   ASM
  1941.     MOVE.L  A6,-(A7)
  1942.     MOVE.L  name,D1
  1943.     MOVE.L  path,D2
  1944.     MOVEA.L _DOSBase,A6
  1945.     JSR -618(A6)
  1946.     MOVEA.L (A7)+,A6
  1947.     TST.W   D0
  1948.     BEQ.B   @end
  1949.     MOVEQ   #1,D0
  1950.   @end: MOVE.B  D0,@RESULT
  1951.   END;
  1952. END;
  1953.  
  1954. FUNCTION AssignLock(name : pCHAR; lock : LONGINT) : BOOLEAN;
  1955. BEGIN
  1956.   ASM
  1957.     MOVE.L  A6,-(A7)
  1958.     MOVE.L  name,D1
  1959.     MOVE.L  lock,D2
  1960.     MOVEA.L _DOSBase,A6
  1961.     JSR -612(A6)
  1962.     MOVEA.L (A7)+,A6
  1963.     TST.L   D0
  1964.     BEQ.B   @end
  1965.     MOVEQ   #1,D0
  1966.     @end: MOVE.B  D0,@RESULT
  1967.   END;
  1968. END;
  1969.  
  1970. FUNCTION AssignPath(name : pCHAR; path : pCHAR) : BOOLEAN;
  1971. BEGIN
  1972.   ASM
  1973.     MOVE.L  A6,-(A7)
  1974.     MOVE.L  name,D1
  1975.     MOVE.L  path,D2
  1976.     MOVEA.L _DOSBase,A6
  1977.     JSR -624(A6)
  1978.     MOVEA.L (A7)+,A6
  1979.     TST.W   D0
  1980.     BEQ.B   @end
  1981.     MOVEQ   #1,D0
  1982.   @end: MOVE.B  D0,@RESULT
  1983.   END;
  1984. END;
  1985.  
  1986. FUNCTION AttemptLockDosList(flags : ULONG) : pDosList;
  1987. BEGIN
  1988.   ASM
  1989.     MOVE.L  A6,-(A7)
  1990.     MOVE.L  flags,D1
  1991.     MOVEA.L _DOSBase,A6
  1992.     JSR -666(A6)
  1993.     MOVEA.L (A7)+,A6
  1994.     MOVE.L  D0,@RESULT
  1995.   END;
  1996. END;
  1997.  
  1998. FUNCTION ChangeMode(type_ : LONGINT; fh : LONGINT; newmode : LONGINT) : BOOLEAN;
  1999. BEGIN
  2000.   ASM
  2001.     MOVE.L  A6,-(A7)
  2002.     MOVE.L  type_,D1
  2003.     MOVE.L  fh,D2
  2004.     MOVE.L  newmode,D3
  2005.     MOVEA.L _DOSBase,A6
  2006.     JSR -450(A6)
  2007.     MOVEA.L (A7)+,A6
  2008.     TST.L   D0
  2009.     BEQ.B   @end
  2010.     MOVEQ   #1,D0
  2011.     @end: MOVE.B  D0,@RESULT
  2012.   END;
  2013. END;
  2014.  
  2015. FUNCTION CheckSignal(mask : LONGINT) : LONGINT;
  2016. BEGIN
  2017.   ASM
  2018.     MOVE.L  A6,-(A7)
  2019.     MOVE.L  mask,D1
  2020.     MOVEA.L _DOSBase,A6
  2021.     JSR -792(A6)
  2022.     MOVEA.L (A7)+,A6
  2023.     MOVE.L  D0,@RESULT
  2024.   END;
  2025. END;
  2026.  
  2027. FUNCTION Cli : pCommandLineInterface;
  2028. BEGIN
  2029.   ASM
  2030.     MOVE.L  A6,-(A7)
  2031.     MOVEA.L _DOSBase,A6
  2032.     JSR -492(A6)
  2033.     MOVEA.L (A7)+,A6
  2034.     MOVE.L  D0,@RESULT
  2035.   END;
  2036. END;
  2037.  
  2038. FUNCTION CliInitNewcli(dp : pDosPacket) : LONGINT;
  2039. BEGIN
  2040.   ASM
  2041.     MOVE.L  A6,-(A7)
  2042.     MOVEA.L dp,A0
  2043.     MOVEA.L _DOSBase,A6
  2044.     JSR -930(A6)
  2045.     MOVEA.L (A7)+,A6
  2046.     MOVE.L  D0,@RESULT
  2047.   END;
  2048. END;
  2049.  
  2050. FUNCTION CliInitRun(dp : pDosPacket) : LONGINT;
  2051. BEGIN
  2052.   ASM
  2053.     MOVE.L  A6,-(A7)
  2054.     MOVEA.L dp,A0
  2055.     MOVEA.L _DOSBase,A6
  2056.     JSR -936(A6)
  2057.     MOVEA.L (A7)+,A6
  2058.     MOVE.L  D0,@RESULT
  2059.   END;
  2060. END;
  2061.  
  2062. FUNCTION CompareDates(date1 : pDateStamp; date2 : pDateStamp) : LONGINT;
  2063. BEGIN
  2064.   ASM
  2065.     MOVE.L  A6,-(A7)
  2066.     MOVE.L  date1,D1
  2067.     MOVE.L  date2,D2
  2068.     MOVEA.L _DOSBase,A6
  2069.     JSR -738(A6)
  2070.     MOVEA.L (A7)+,A6
  2071.     MOVE.L  D0,@RESULT
  2072.   END;
  2073. END;
  2074.  
  2075. FUNCTION CreateDir(name : pCHAR) : LONGINT;
  2076. BEGIN
  2077.   ASM
  2078.     MOVE.L  A6,-(A7)
  2079.     MOVE.L  name,D1
  2080.     MOVEA.L _DOSBase,A6
  2081.     JSR -120(A6)
  2082.     MOVEA.L (A7)+,A6
  2083.     MOVE.L  D0,@RESULT
  2084.   END;
  2085. END;
  2086.  
  2087. FUNCTION CreateNewProc(tags : pTagItem) : pProcess;
  2088. BEGIN
  2089.   ASM
  2090.     MOVE.L  A6,-(A7)
  2091.     MOVE.L  tags,D1
  2092.     MOVEA.L _DOSBase,A6
  2093.     JSR -498(A6)
  2094.     MOVEA.L (A7)+,A6
  2095.     MOVE.L  D0,@RESULT
  2096.   END;
  2097. END;
  2098.  
  2099. FUNCTION CreateNewProcTagList(tags : pTagItem) : pProcess;
  2100. BEGIN
  2101.   ASM
  2102.     MOVE.L  A6,-(A7)
  2103.     MOVE.L  tags,D1
  2104.     MOVEA.L _DOSBase,A6
  2105.     JSR -498(A6)
  2106.     MOVEA.L (A7)+,A6
  2107.     MOVE.L  D0,@RESULT
  2108.   END;
  2109. END;
  2110.  
  2111. FUNCTION CreateProc(name : pCHAR; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort;
  2112. BEGIN
  2113.   ASM
  2114.     MOVE.L  A6,-(A7)
  2115.     MOVE.L  name,D1
  2116.     MOVE.L  pri,D2
  2117.     MOVE.L  segList,D3
  2118.     MOVE.L  stackSize,D4
  2119.     MOVEA.L _DOSBase,A6
  2120.     JSR -138(A6)
  2121.     MOVEA.L (A7)+,A6
  2122.     MOVE.L  D0,@RESULT
  2123.   END;
  2124. END;
  2125.  
  2126. FUNCTION CurrentDir(lock : LONGINT) : LONGINT;
  2127. BEGIN
  2128.   ASM
  2129.     MOVE.L  A6,-(A7)
  2130.     MOVE.L  lock,D1
  2131.     MOVEA.L _DOSBase,A6
  2132.     JSR -126(A6)
  2133.     MOVEA.L (A7)+,A6
  2134.     MOVE.L  D0,@RESULT
  2135.   END;
  2136. END;
  2137.  
  2138. PROCEDURE DateStamp(VAR date : pDateStamp);
  2139. BEGIN
  2140.   ASM
  2141.     MOVE.L  A6,-(A7)
  2142.     MOVE.L  date,D1
  2143.     MOVEA.L _DOSBase,A6
  2144.     JSR -192(A6)
  2145.     MOVEA.L (A7)+,A6
  2146.   END;
  2147. END;
  2148.  
  2149. FUNCTION DateToStr(datetime : pDateTime) : BOOLEAN;
  2150. BEGIN
  2151.   ASM
  2152.     MOVE.L  A6,-(A7)
  2153.     MOVE.L  datetime,D1
  2154.     MOVEA.L _DOSBase,A6
  2155.     JSR -744(A6)
  2156.     MOVEA.L (A7)+,A6
  2157.     TST.L   D0
  2158.     BEQ.B   @end
  2159.     MOVEQ   #1,D0
  2160.     @end: MOVE.B  D0,@RESULT
  2161.   END;
  2162. END;
  2163.  
  2164. FUNCTION DeleteFile(name : pCHAR) : BOOLEAN;
  2165. BEGIN
  2166.   ASM
  2167.     MOVE.L  A6,-(A7)
  2168.     MOVE.L  name,D1
  2169.     MOVEA.L _DOSBase,A6
  2170.     JSR -072(A6)
  2171.     MOVEA.L (A7)+,A6
  2172.     TST.L   D0
  2173.     BEQ.B   @end
  2174.     MOVEQ   #1,D0
  2175.     @end: MOVE.B  D0,@RESULT
  2176.   END;
  2177. END;
  2178.  
  2179. FUNCTION DeleteVar(name : pCHAR; flags : ULONG) : BOOLEAN;
  2180. BEGIN
  2181.   ASM
  2182.     MOVE.L  A6,-(A7)
  2183.     MOVE.L  name,D1
  2184.     MOVE.L  flags,D2
  2185.     MOVEA.L _DOSBase,A6
  2186.     JSR -912(A6)
  2187.     MOVEA.L (A7)+,A6
  2188.     TST.L   D0
  2189.     BEQ.B   @end
  2190.     MOVEQ   #1,D0
  2191.     @end: MOVE.B  D0,@RESULT
  2192.   END;
  2193. END;
  2194.  
  2195. FUNCTION DeviceProc(name : pCHAR) : pMsgPort;
  2196. BEGIN
  2197.   ASM
  2198.     MOVE.L  A6,-(A7)
  2199.     MOVE.L  name,D1
  2200.     MOVEA.L _DOSBase,A6
  2201.     JSR -174(A6)
  2202.     MOVEA.L (A7)+,A6
  2203.     MOVE.L  D0,@RESULT
  2204.   END;
  2205. END;
  2206.  
  2207. FUNCTION DoPkt(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT; arg5 : LONGINT) : LONGINT;
  2208. BEGIN
  2209.   ASM
  2210.     MOVE.L  A6,-(A7)
  2211.     MOVE.L  port,D1
  2212.     MOVE.L  action,D2
  2213.     MOVE.L  arg1,D3
  2214.     MOVE.L  arg2,D4
  2215.     MOVE.L  arg3,D5
  2216.     MOVE.L  arg4,D6
  2217.     MOVE.L  arg5,D7
  2218.     MOVEA.L _DOSBase,A6
  2219.     JSR -240(A6)
  2220.     MOVEA.L (A7)+,A6
  2221.     MOVE.L  D0,@RESULT
  2222.   END;
  2223. END;
  2224.  
  2225. FUNCTION DoPkt0(port : pMsgPort; action : LONGINT) : LONGINT;
  2226. BEGIN
  2227.   ASM
  2228.     MOVE.L  A6,-(A7)
  2229.     MOVE.L  port,D1
  2230.     MOVE.L  action,D2
  2231.     MOVEA.L _DOSBase,A6
  2232.     JSR -240(A6)
  2233.     MOVEA.L (A7)+,A6
  2234.     MOVE.L  D0,@RESULT
  2235.   END;
  2236. END;
  2237.  
  2238. FUNCTION DoPkt1(port : pMsgPort; action : LONGINT; arg1 : LONGINT) : LONGINT;
  2239. BEGIN
  2240.   ASM
  2241.     MOVE.L  A6,-(A7)
  2242.     MOVE.L  port,D1
  2243.     MOVE.L  action,D2
  2244.     MOVE.L  arg1,D3
  2245.     MOVEA.L _DOSBase,A6
  2246.     JSR -240(A6)
  2247.     MOVEA.L (A7)+,A6
  2248.     MOVE.L  D0,@RESULT
  2249.   END;
  2250. END;
  2251.  
  2252. FUNCTION DoPkt2(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT) : LONGINT;
  2253. BEGIN
  2254.   ASM
  2255.     MOVE.L  A6,-(A7)
  2256.     MOVE.L  port,D1
  2257.     MOVE.L  action,D2
  2258.     MOVE.L  arg1,D3
  2259.     MOVE.L  arg2,D4
  2260.     MOVEA.L _DOSBase,A6
  2261.     JSR -240(A6)
  2262.     MOVEA.L (A7)+,A6
  2263.     MOVE.L  D0,@RESULT
  2264.   END;
  2265. END;
  2266.  
  2267. FUNCTION DoPkt3(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT) : LONGINT;
  2268. BEGIN
  2269.   ASM
  2270.     MOVE.L  A6,-(A7)
  2271.     MOVE.L  port,D1
  2272.     MOVE.L  action,D2
  2273.     MOVE.L  arg1,D3
  2274.     MOVE.L  arg2,D4
  2275.     MOVE.L  arg3,D5
  2276.     MOVEA.L _DOSBase,A6
  2277.     JSR -240(A6)
  2278.     MOVEA.L (A7)+,A6
  2279.     MOVE.L  D0,@RESULT
  2280.   END;
  2281. END;
  2282.  
  2283. FUNCTION DoPkt4(port : pMsgPort; action : LONGINT; arg1 : LONGINT; arg2 : LONGINT; arg3 : LONGINT; arg4 : LONGINT) : LONGINT;
  2284. BEGIN
  2285.   ASM
  2286.     MOVE.L  A6,-(A7)
  2287.     MOVE.L  port,D1
  2288.     MOVE.L  action,D2
  2289.     MOVE.L  arg1,D3
  2290.     MOVE.L  arg2,D4
  2291.     MOVE.L  arg3,D5
  2292.     MOVE.L  arg4,D6
  2293.     MOVEA.L _DOSBase,A6
  2294.     JSR -240(A6)
  2295.     MOVEA.L (A7)+,A6
  2296.     MOVE.L  D0,@RESULT
  2297.   END;
  2298. END;
  2299.  
  2300. PROCEDURE DOSClose(file_ : LONGINT);
  2301. BEGIN
  2302.   ASM
  2303.     MOVE.L  A6,-(A7)
  2304.     MOVE.L  file_,D1
  2305.     MOVEA.L _DOSBase,A6
  2306.     JSR -036(A6)
  2307.     MOVEA.L (A7)+,A6
  2308.   END;
  2309. END;
  2310.  
  2311. PROCEDURE DOSDelay(timeout : LONGINT);
  2312. BEGIN
  2313.   ASM
  2314.     MOVE.L  A6,-(A7)
  2315.     MOVE.L  timeout,D1
  2316.     MOVEA.L _DOSBase,A6
  2317.     JSR -198(A6)
  2318.     MOVEA.L (A7)+,A6
  2319.   END;
  2320. END;
  2321.  
  2322. PROCEDURE DOSExit(returnCode : LONGINT);
  2323. BEGIN
  2324.   ASM
  2325.     MOVE.L  A6,-(A7)
  2326.     MOVE.L  returnCode,D1
  2327.     MOVEA.L _DOSBase,A6
  2328.     JSR -144(A6)
  2329.     MOVEA.L (A7)+,A6
  2330.   END;
  2331. END;
  2332.  
  2333. FUNCTION DOSFlush(fh : LONGINT) : BOOLEAN;
  2334. BEGIN
  2335.   ASM
  2336.     MOVE.L  A6,-(A7)
  2337.     MOVE.L  fh,D1
  2338.     MOVEA.L _DOSBase,A6
  2339.     JSR -360(A6)
  2340.     MOVEA.L (A7)+,A6
  2341.     TST.L   D0
  2342.     BEQ.B   @end
  2343.     MOVEQ   #1,D0
  2344.     @end: MOVE.B  D0,@RESULT
  2345.   END;
  2346. END;
  2347.  
  2348. FUNCTION DOSInput : LONGINT;
  2349. BEGIN
  2350.   ASM
  2351.     MOVE.L  A6,-(A7)
  2352.     MOVEA.L _DOSBase,A6
  2353.     JSR -054(A6)
  2354.     MOVEA.L (A7)+,A6
  2355.     MOVE.L  D0,@RESULT
  2356.   END;
  2357. END;
  2358.  
  2359. FUNCTION DOSOpen(name : pCHAR; accessMode : LONGINT) : LONGINT;
  2360. BEGIN
  2361.   ASM
  2362.     MOVE.L  A6,-(A7)
  2363.     MOVE.L  name,D1
  2364.     MOVE.L  accessMode,D2
  2365.     MOVEA.L _DOSBase,A6
  2366.     JSR -030(A6)
  2367.     MOVEA.L (A7)+,A6
  2368.     MOVE.L  D0,@RESULT
  2369.   END;
  2370. END;
  2371.  
  2372. FUNCTION DOSOutput : LONGINT;
  2373. BEGIN
  2374.   ASM
  2375.     MOVE.L  A6,-(A7)
  2376.     MOVEA.L _DOSBase,A6
  2377.     JSR -060(A6)
  2378.     MOVEA.L (A7)+,A6
  2379.     MOVE.L  D0,@RESULT
  2380.   END;
  2381. END;
  2382.  
  2383. FUNCTION DOSRead(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT;
  2384. BEGIN
  2385.   ASM
  2386.     MOVE.L  A6,-(A7)
  2387.     MOVE.L  file_,D1
  2388.     MOVE.L  buffer,D2
  2389.     MOVE.L  length,D3
  2390.     MOVEA.L _DOSBase,A6
  2391.     JSR -042(A6)
  2392.     MOVEA.L (A7)+,A6
  2393.     MOVE.L  D0,@RESULT
  2394.   END;
  2395. END;
  2396.  
  2397. FUNCTION DOSRename(oldName : pCHAR; newName : pCHAR) : LONGINT;
  2398. BEGIN
  2399.   ASM
  2400.     MOVE.L  A6,-(A7)
  2401.     MOVE.L  oldName,D1
  2402.     MOVE.L  newName,D2
  2403.     MOVEA.L _DOSBase,A6
  2404.     JSR -078(A6)
  2405.     MOVEA.L (A7)+,A6
  2406.     MOVE.L  D0,@RESULT
  2407.   END;
  2408. END;
  2409.  
  2410. FUNCTION DOSSeek(file_ : LONGINT; position : LONGINT; offset : LONGINT) : LONGINT;
  2411. BEGIN
  2412.   ASM
  2413.     MOVE.L  A6,-(A7)
  2414.     MOVE.L  file_,D1
  2415.     MOVE.L  position,D2
  2416.     MOVE.L  offset,D3
  2417.     MOVEA.L _DOSBase,A6
  2418.     JSR -066(A6)
  2419.     MOVEA.L (A7)+,A6
  2420.     MOVE.L  D0,@RESULT
  2421.   END;
  2422. END;
  2423.  
  2424. FUNCTION DOSWrite(file_ : LONGINT; buffer : POINTER; length : LONGINT) : LONGINT;
  2425. BEGIN
  2426.   ASM
  2427.     MOVE.L  A6,-(A7)
  2428.     MOVE.L  file_,D1
  2429.     MOVE.L  buffer,D2
  2430.     MOVE.L  length,D3
  2431.     MOVEA.L _DOSBase,A6
  2432.     JSR -048(A6)
  2433.     MOVEA.L (A7)+,A6
  2434.     MOVE.L  D0,@RESULT
  2435.   END;
  2436. END;
  2437.  
  2438. FUNCTION DupLock(lock : LONGINT) : LONGINT;
  2439. BEGIN
  2440.   ASM
  2441.     MOVE.L  A6,-(A7)
  2442.     MOVE.L  lock,D1
  2443.     MOVEA.L _DOSBase,A6
  2444.     JSR -096(A6)
  2445.     MOVEA.L (A7)+,A6
  2446.     MOVE.L  D0,@RESULT
  2447.   END;
  2448. END;
  2449.  
  2450. FUNCTION DupLockFromFH(fh : LONGINT) : LONGINT;
  2451. BEGIN
  2452.   ASM
  2453.     MOVE.L  A6,-(A7)
  2454.     MOVE.L  fh,D1
  2455.     MOVEA.L _DOSBase,A6
  2456.     JSR -372(A6)
  2457.     MOVEA.L (A7)+,A6
  2458.     MOVE.L  D0,@RESULT
  2459.   END;
  2460. END;
  2461.  
  2462. PROCEDURE EndNotify(notify : pNotifyRequest);
  2463. BEGIN
  2464.   ASM
  2465.     MOVE.L  A6,-(A7)
  2466.     MOVE.L  notify,D1
  2467.     MOVEA.L _DOSBase,A6
  2468.     JSR -894(A6)
  2469.     MOVEA.L (A7)+,A6
  2470.   END;
  2471. END;
  2472.  
  2473. FUNCTION ErrorReport(code : LONGINT; type_ : LONGINT; arg1 : ULONG; device : pMsgPort) : BOOLEAN;
  2474. BEGIN
  2475.   ASM
  2476.     MOVE.L  A6,-(A7)
  2477.     MOVE.L  code,D1
  2478.     MOVE.L  type_,D2
  2479.     MOVE.L  arg1,D3
  2480.     MOVE.L  device,D4
  2481.     MOVEA.L _DOSBase,A6
  2482.     JSR -480(A6)
  2483.     MOVEA.L (A7)+,A6
  2484.     TST.L   D0
  2485.     BEQ.B   @end
  2486.     MOVEQ   #1,D0
  2487.     @end: MOVE.B  D0,@RESULT
  2488.   END;
  2489. END;
  2490.  
  2491. FUNCTION ExAll(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl) : BOOLEAN;
  2492. BEGIN
  2493.   ASM
  2494.     MOVE.L  A6,-(A7)
  2495.     MOVE.L  lock,D1
  2496.     MOVE.L  buffer,D2
  2497.     MOVE.L  size,D3
  2498.     MOVE.L  data,D4
  2499.     MOVE.L  control,D5
  2500.     MOVEA.L _DOSBase,A6
  2501.     JSR -432(A6)
  2502.     MOVEA.L (A7)+,A6
  2503.     TST.L   D0
  2504.     BEQ.B   @end
  2505.     MOVEQ   #1,D0
  2506.     @end: MOVE.B  D0,@RESULT
  2507.   END;
  2508. END;
  2509.  
  2510. PROCEDURE ExAllEnd(lock : LONGINT; buffer : pExAllData; size : LONGINT; data : LONGINT; control : pExAllControl);
  2511. BEGIN
  2512.   ASM
  2513.     MOVE.L  A6,-(A7)
  2514.     MOVE.L  lock,D1
  2515.     MOVE.L  buffer,D2
  2516.     MOVE.L  size,D3
  2517.     MOVE.L  data,D4
  2518.     MOVE.L  control,D5
  2519.     MOVEA.L _DOSBase,A6
  2520.     JSR -990(A6)
  2521.     MOVEA.L (A7)+,A6
  2522.   END;
  2523. END;
  2524.  
  2525. FUNCTION Examine(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN;
  2526. BEGIN
  2527.   ASM
  2528.     MOVE.L  A6,-(A7)
  2529.     MOVE.L  lock,D1
  2530.     MOVE.L  fileInfoBlock,D2
  2531.     MOVEA.L _DOSBase,A6
  2532.     JSR -102(A6)
  2533.     MOVEA.L (A7)+,A6
  2534.     TST.L   D0
  2535.     BEQ.B   @end
  2536.     MOVEQ   #1,D0
  2537.     @end: MOVE.B  D0,@RESULT
  2538.   END;
  2539. END;
  2540.  
  2541. FUNCTION ExamineFH(fh : LONGINT; fib : pFileInfoBlock) : BOOLEAN;
  2542. BEGIN
  2543.   ASM
  2544.     MOVE.L  A6,-(A7)
  2545.     MOVE.L  fh,D1
  2546.     MOVE.L  fib,D2
  2547.     MOVEA.L _DOSBase,A6
  2548.     JSR -390(A6)
  2549.     MOVEA.L (A7)+,A6
  2550.     TST.W   D0
  2551.     BEQ.B   @end
  2552.     MOVEQ   #1,D0
  2553.   @end: MOVE.B  D0,@RESULT
  2554.   END;
  2555. END;
  2556.  
  2557. FUNCTION Execute(string_ : pCHAR; file_ : LONGINT; file2 : LONGINT) : BOOLEAN;
  2558. BEGIN
  2559.   ASM
  2560.     MOVE.L  A6,-(A7)
  2561.     MOVE.L  string_,D1
  2562.     MOVE.L  file_,D2
  2563.     MOVE.L  file2,D3
  2564.     MOVEA.L _DOSBase,A6
  2565.     JSR -222(A6)
  2566.     MOVEA.L (A7)+,A6
  2567.     TST.L   D0
  2568.     BEQ.B   @end
  2569.     MOVEQ   #1,D0
  2570.     @end: MOVE.B  D0,@RESULT
  2571.   END;
  2572. END;
  2573.  
  2574. FUNCTION ExNext(lock : LONGINT; fileInfoBlock : pFileInfoBlock) : BOOLEAN;
  2575. BEGIN
  2576.   ASM
  2577.     MOVE.L  A6,-(A7)
  2578.     MOVE.L  lock,D1
  2579.     MOVE.L  fileInfoBlock,D2
  2580.     MOVEA.L _DOSBase,A6
  2581.     JSR -108(A6)
  2582.     MOVEA.L (A7)+,A6
  2583.     TST.L   D0
  2584.     BEQ.B   @end
  2585.     MOVEQ   #1,D0
  2586.     @end: MOVE.B  D0,@RESULT
  2587.   END;
  2588. END;
  2589.  
  2590. FUNCTION Fault(code : LONGINT; header : pCHAR; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  2591. BEGIN
  2592.   ASM
  2593.     MOVE.L  A6,-(A7)
  2594.     MOVE.L  code,D1
  2595.     MOVE.L  header,D2
  2596.     MOVE.L  buffer,D3
  2597.     MOVE.L  len,D4
  2598.     MOVEA.L _DOSBase,A6
  2599.     JSR -468(A6)
  2600.     MOVEA.L (A7)+,A6
  2601.     TST.W   D0
  2602.     BEQ.B   @end
  2603.     MOVEQ   #1,D0
  2604.   @end: MOVE.B  D0,@RESULT
  2605.   END;
  2606. END;
  2607.  
  2608. FUNCTION FGetC(fh : LONGINT) : LONGINT;
  2609. BEGIN
  2610.   ASM
  2611.     MOVE.L  A6,-(A7)
  2612.     MOVE.L  fh,D1
  2613.     MOVEA.L _DOSBase,A6
  2614.     JSR -306(A6)
  2615.     MOVEA.L (A7)+,A6
  2616.     MOVE.L  D0,@RESULT
  2617.   END;
  2618. END;
  2619.  
  2620. FUNCTION FGets(fh : LONGINT; buf : pCHAR; buflen : ULONG) : pCHAR;
  2621. BEGIN
  2622.   ASM
  2623.     MOVE.L  A6,-(A7)
  2624.     MOVE.L  fh,D1
  2625.     MOVE.L  buf,D2
  2626.     MOVE.L  buflen,D3
  2627.     MOVEA.L _DOSBase,A6
  2628.     JSR -336(A6)
  2629.     MOVEA.L (A7)+,A6
  2630.     MOVE.L  D0,@RESULT
  2631.   END;
  2632. END;
  2633.  
  2634. FUNCTION FilePart(path : pCHAR) : pCHAR;
  2635. BEGIN
  2636.   ASM
  2637.     MOVE.L  A6,-(A7)
  2638.     MOVE.L  path,D1
  2639.     MOVEA.L _DOSBase,A6
  2640.     JSR -870(A6)
  2641.     MOVEA.L (A7)+,A6
  2642.     MOVE.L  D0,@RESULT
  2643.   END;
  2644. END;
  2645.  
  2646. FUNCTION FindArg(keyword : pCHAR; arg_template : pCHAR) : LONGINT;
  2647. BEGIN
  2648.   ASM
  2649.     MOVE.L  A6,-(A7)
  2650.     MOVE.L  keyword,D1
  2651.     MOVE.L  arg_template,D2
  2652.     MOVEA.L _DOSBase,A6
  2653.     JSR -804(A6)
  2654.     MOVEA.L (A7)+,A6
  2655.     MOVE.L  D0,@RESULT
  2656.   END;
  2657. END;
  2658.  
  2659. FUNCTION FindCliProc(num : ULONG) : pProcess;
  2660. BEGIN
  2661.   ASM
  2662.     MOVE.L  A6,-(A7)
  2663.     MOVE.L  num,D1
  2664.     MOVEA.L _DOSBase,A6
  2665.     JSR -546(A6)
  2666.     MOVEA.L (A7)+,A6
  2667.     MOVE.L  D0,@RESULT
  2668.   END;
  2669. END;
  2670.  
  2671. FUNCTION FindDosEntry(dlist : pDosList; name : pCHAR; flags : ULONG) : pDosList;
  2672. BEGIN
  2673.   ASM
  2674.     MOVE.L  A6,-(A7)
  2675.     MOVE.L  dlist,D1
  2676.     MOVE.L  name,D2
  2677.     MOVE.L  flags,D3
  2678.     MOVEA.L _DOSBase,A6
  2679.     JSR -684(A6)
  2680.     MOVEA.L (A7)+,A6
  2681.     MOVE.L  D0,@RESULT
  2682.   END;
  2683. END;
  2684.  
  2685. FUNCTION FindSegment(name : pCHAR; seg : pSegment; system : LONGINT) : pSegment;
  2686. BEGIN
  2687.   ASM
  2688.     MOVE.L  A6,-(A7)
  2689.     MOVE.L  name,D1
  2690.     MOVE.L  seg,D2
  2691.     MOVE.L  system,D3
  2692.     MOVEA.L _DOSBase,A6
  2693.     JSR -780(A6)
  2694.     MOVEA.L (A7)+,A6
  2695.     MOVE.L  D0,@RESULT
  2696.   END;
  2697. END;
  2698.  
  2699. FUNCTION FindVar(name : pCHAR; type_ : ULONG) : pLocalVar;
  2700. BEGIN
  2701.   ASM
  2702.     MOVE.L  A6,-(A7)
  2703.     MOVE.L  name,D1
  2704.     MOVE.L  type_,D2
  2705.     MOVEA.L _DOSBase,A6
  2706.     JSR -918(A6)
  2707.     MOVEA.L (A7)+,A6
  2708.     MOVE.L  D0,@RESULT
  2709.   END;
  2710. END;
  2711.  
  2712. FUNCTION Format(filesystem : pCHAR; volumename : pCHAR; dostype : ULONG) : BOOLEAN;
  2713. BEGIN
  2714.   ASM
  2715.     MOVE.L  A6,-(A7)
  2716.     MOVE.L  filesystem,D1
  2717.     MOVE.L  volumename,D2
  2718.     MOVE.L  dostype,D3
  2719.     MOVEA.L _DOSBase,A6
  2720.     JSR -714(A6)
  2721.     MOVEA.L (A7)+,A6
  2722.     TST.W   D0
  2723.     BEQ.B   @end
  2724.     MOVEQ   #1,D0
  2725.   @end: MOVE.B  D0,@RESULT
  2726.   END;
  2727. END;
  2728.  
  2729. FUNCTION FPutC(fh : LONGINT; ch : LONGINT) : LONGINT;
  2730. BEGIN
  2731.   ASM
  2732.     MOVE.L  A6,-(A7)
  2733.     MOVE.L  fh,D1
  2734.     MOVE.L  ch,D2
  2735.     MOVEA.L _DOSBase,A6
  2736.     JSR -312(A6)
  2737.     MOVEA.L (A7)+,A6
  2738.     MOVE.L  D0,@RESULT
  2739.   END;
  2740. END;
  2741.  
  2742. FUNCTION FPuts(fh : LONGINT; str : pCHAR) : BOOLEAN;
  2743. BEGIN
  2744.   ASM
  2745.     MOVE.L  A6,-(A7)
  2746.     MOVE.L  fh,D1
  2747.     MOVE.L  str,D2
  2748.     MOVEA.L _DOSBase,A6
  2749.     JSR -342(A6)
  2750.     MOVEA.L (A7)+,A6
  2751.     TST.L   D0
  2752.     BEQ.B   @end
  2753.     MOVEQ   #1,D0
  2754.     @end: MOVE.B  D0,@RESULT
  2755.   END;
  2756. END;
  2757.  
  2758. FUNCTION FRead(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT;
  2759. BEGIN
  2760.   ASM
  2761.     MOVE.L  A6,-(A7)
  2762.     MOVE.L  fh,D1
  2763.     MOVE.L  block,D2
  2764.     MOVE.L  blocklen,D3
  2765.     MOVE.L  number,D4
  2766.     MOVEA.L _DOSBase,A6
  2767.     JSR -324(A6)
  2768.     MOVEA.L (A7)+,A6
  2769.     MOVE.L  D0,@RESULT
  2770.   END;
  2771. END;
  2772.  
  2773. PROCEDURE FreeArgs(args : pRDArgs);
  2774. BEGIN
  2775.   ASM
  2776.     MOVE.L  A6,-(A7)
  2777.     MOVE.L  args,D1
  2778.     MOVEA.L _DOSBase,A6
  2779.     JSR -858(A6)
  2780.     MOVEA.L (A7)+,A6
  2781.   END;
  2782. END;
  2783.  
  2784. PROCEDURE FreeDeviceProc(dp : pDevProc);
  2785. BEGIN
  2786.   ASM
  2787.     MOVE.L  A6,-(A7)
  2788.     MOVE.L  dp,D1
  2789.     MOVEA.L _DOSBase,A6
  2790.     JSR -648(A6)
  2791.     MOVEA.L (A7)+,A6
  2792.   END;
  2793. END;
  2794.  
  2795. PROCEDURE FreeDosEntry(dlist : pDosList);
  2796. BEGIN
  2797.   ASM
  2798.     MOVE.L  A6,-(A7)
  2799.     MOVE.L  dlist,D1
  2800.     MOVEA.L _DOSBase,A6
  2801.     JSR -702(A6)
  2802.     MOVEA.L (A7)+,A6
  2803.   END;
  2804. END;
  2805.  
  2806. PROCEDURE FreeDosObject(type_ : ULONG; ptr : POINTER);
  2807. BEGIN
  2808.   ASM
  2809.     MOVE.L  A6,-(A7)
  2810.     MOVE.L  type_,D1
  2811.     MOVE.L  ptr,D2
  2812.     MOVEA.L _DOSBase,A6
  2813.     JSR -234(A6)
  2814.     MOVEA.L (A7)+,A6
  2815.   END;
  2816. END;
  2817.  
  2818. FUNCTION FWrite(fh : LONGINT; block : POINTER; blocklen : ULONG; number : ULONG) : LONGINT;
  2819. BEGIN
  2820.   ASM
  2821.     MOVE.L  A6,-(A7)
  2822.     MOVE.L  fh,D1
  2823.     MOVE.L  block,D2
  2824.     MOVE.L  blocklen,D3
  2825.     MOVE.L  number,D4
  2826.     MOVEA.L _DOSBase,A6
  2827.     JSR -330(A6)
  2828.     MOVEA.L (A7)+,A6
  2829.     MOVE.L  D0,@RESULT
  2830.   END;
  2831. END;
  2832.  
  2833. FUNCTION GetArgStr : pCHAR;
  2834. BEGIN
  2835.   ASM
  2836.     MOVE.L  A6,-(A7)
  2837.     MOVEA.L _DOSBase,A6
  2838.     JSR -534(A6)
  2839.     MOVEA.L (A7)+,A6
  2840.     MOVE.L  D0,@RESULT
  2841.   END;
  2842. END;
  2843.  
  2844. FUNCTION GetConsoleTask : pMsgPort;
  2845. BEGIN
  2846.   ASM
  2847.     MOVE.L  A6,-(A7)
  2848.     MOVEA.L _DOSBase,A6
  2849.     JSR -510(A6)
  2850.     MOVEA.L (A7)+,A6
  2851.     MOVE.L  D0,@RESULT
  2852.   END;
  2853. END;
  2854.  
  2855. FUNCTION GetCurrentDirName(buf : pCHAR; len : LONGINT) : BOOLEAN;
  2856. BEGIN
  2857.   ASM
  2858.     MOVE.L  A6,-(A7)
  2859.     MOVE.L  buf,D1
  2860.     MOVE.L  len,D2
  2861.     MOVEA.L _DOSBase,A6
  2862.     JSR -564(A6)
  2863.     MOVEA.L (A7)+,A6
  2864.     TST.W   D0
  2865.     BEQ.B   @end
  2866.     MOVEQ   #1,D0
  2867.   @end: MOVE.B  D0,@RESULT
  2868.   END;
  2869. END;
  2870.  
  2871. FUNCTION GetDeviceProc(name : pCHAR; dp : pDevProc) : pDevProc;
  2872. BEGIN
  2873.   ASM
  2874.     MOVE.L  A6,-(A7)
  2875.     MOVE.L  name,D1
  2876.     MOVE.L  dp,D2
  2877.     MOVEA.L _DOSBase,A6
  2878.     JSR -642(A6)
  2879.     MOVEA.L (A7)+,A6
  2880.     MOVE.L  D0,@RESULT
  2881.   END;
  2882. END;
  2883.  
  2884. FUNCTION GetFileSysTask : pMsgPort;
  2885. BEGIN
  2886.   ASM
  2887.     MOVE.L  A6,-(A7)
  2888.     MOVEA.L _DOSBase,A6
  2889.     JSR -522(A6)
  2890.     MOVEA.L (A7)+,A6
  2891.     MOVE.L  D0,@RESULT
  2892.   END;
  2893. END;
  2894.  
  2895. FUNCTION GetProgramDir : LONGINT;
  2896. BEGIN
  2897.   ASM
  2898.     MOVE.L  A6,-(A7)
  2899.     MOVEA.L _DOSBase,A6
  2900.     JSR -600(A6)
  2901.     MOVEA.L (A7)+,A6
  2902.     MOVE.L  D0,@RESULT
  2903.   END;
  2904. END;
  2905.  
  2906. FUNCTION GetProgramName(buf : pCHAR; len : LONGINT) : BOOLEAN;
  2907. BEGIN
  2908.   ASM
  2909.     MOVE.L  A6,-(A7)
  2910.     MOVE.L  buf,D1
  2911.     MOVE.L  len,D2
  2912.     MOVEA.L _DOSBase,A6
  2913.     JSR -576(A6)
  2914.     MOVEA.L (A7)+,A6
  2915.     TST.W   D0
  2916.     BEQ.B   @end
  2917.     MOVEQ   #1,D0
  2918.   @end: MOVE.B  D0,@RESULT
  2919.   END;
  2920. END;
  2921.  
  2922. FUNCTION GetPrompt(buf : pCHAR; len : LONGINT) : BOOLEAN;
  2923. BEGIN
  2924.   ASM
  2925.     MOVE.L  A6,-(A7)
  2926.     MOVE.L  buf,D1
  2927.     MOVE.L  len,D2
  2928.     MOVEA.L _DOSBase,A6
  2929.     JSR -588(A6)
  2930.     MOVEA.L (A7)+,A6
  2931.     TST.W   D0
  2932.     BEQ.B   @end
  2933.     MOVEQ   #1,D0
  2934.   @end: MOVE.B  D0,@RESULT
  2935.   END;
  2936. END;
  2937.  
  2938. FUNCTION GetVar(name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT;
  2939. BEGIN
  2940.   ASM
  2941.     MOVE.L  A6,-(A7)
  2942.     MOVE.L  name,D1
  2943.     MOVE.L  buffer,D2
  2944.     MOVE.L  size,D3
  2945.     MOVE.L  flags,D4
  2946.     MOVEA.L _DOSBase,A6
  2947.     JSR -906(A6)
  2948.     MOVEA.L (A7)+,A6
  2949.     MOVE.L  D0,@RESULT
  2950.   END;
  2951. END;
  2952.  
  2953. FUNCTION Info(lock : LONGINT; parameterBlock : pInfoData) : BOOLEAN;
  2954. BEGIN
  2955.   ASM
  2956.     MOVE.L  A6,-(A7)
  2957.     MOVE.L  lock,D1
  2958.     MOVE.L  parameterBlock,D2
  2959.     MOVEA.L _DOSBase,A6
  2960.     JSR -114(A6)
  2961.     MOVEA.L (A7)+,A6
  2962.     TST.L   D0
  2963.     BEQ.B   @end
  2964.     MOVEQ   #1,D0
  2965.     @end: MOVE.B  D0,@RESULT
  2966.   END;
  2967. END;
  2968.  
  2969. FUNCTION Inhibit(name : pCHAR; onoff : LONGINT) : BOOLEAN;
  2970. BEGIN
  2971.   ASM
  2972.     MOVE.L  A6,-(A7)
  2973.     MOVE.L  name,D1
  2974.     MOVE.L  onoff,D2
  2975.     MOVEA.L _DOSBase,A6
  2976.     JSR -726(A6)
  2977.     MOVEA.L (A7)+,A6
  2978.     TST.L   D0
  2979.     BEQ.B   @end
  2980.     MOVEQ   #1,D0
  2981.     @end: MOVE.B  D0,@RESULT
  2982.   END;
  2983. END;
  2984.  
  2985. FUNCTION InternalLoadSeg(fh : LONGINT; table : LONGINT; VAR funcarray : LONGINT; VAR stack : LONGINT) : LONGINT;
  2986. BEGIN
  2987.   ASM
  2988.     MOVE.L  A6,-(A7)
  2989.     MOVE.L  fh,D0
  2990.     MOVEA.L table,A0
  2991.     MOVEA.L funcarray,A1
  2992.     MOVEA.L stack,A2
  2993.     MOVEA.L _DOSBase,A6
  2994.     JSR -756(A6)
  2995.     MOVEA.L (A7)+,A6
  2996.     MOVE.L  D0,@RESULT
  2997.   END;
  2998. END;
  2999.  
  3000. FUNCTION InternalUnLoadSeg(seglist : LONGINT; freefunc : tPROCEDURE) : BOOLEAN;
  3001. BEGIN
  3002.   ASM
  3003.     MOVE.L  A6,-(A7)
  3004.     MOVE.L  seglist,D1
  3005.     MOVEA.L freefunc,A1
  3006.     MOVEA.L _DOSBase,A6
  3007.     JSR -762(A6)
  3008.     MOVEA.L (A7)+,A6
  3009.     TST.W   D0
  3010.     BEQ.B   @end
  3011.     MOVEQ   #1,D0
  3012.   @end: MOVE.B  D0,@RESULT
  3013.   END;
  3014. END;
  3015.  
  3016. FUNCTION IoErr : LONGINT;
  3017. BEGIN
  3018.   ASM
  3019.     MOVE.L  A6,-(A7)
  3020.     MOVEA.L _DOSBase,A6
  3021.     JSR -132(A6)
  3022.     MOVEA.L (A7)+,A6
  3023.     MOVE.L  D0,@RESULT
  3024.   END;
  3025. END;
  3026.  
  3027. FUNCTION IsFileSystem(name : pCHAR) : BOOLEAN;
  3028. BEGIN
  3029.   ASM
  3030.     MOVE.L  A6,-(A7)
  3031.     MOVE.L  name,D1
  3032.     MOVEA.L _DOSBase,A6
  3033.     JSR -708(A6)
  3034.     MOVEA.L (A7)+,A6
  3035.     TST.W   D0
  3036.     BEQ.B   @end
  3037.     MOVEQ   #1,D0
  3038.   @end: MOVE.B  D0,@RESULT
  3039.   END;
  3040. END;
  3041.  
  3042. FUNCTION IsInteractive(file_ : LONGINT) : BOOLEAN;
  3043. BEGIN
  3044.   ASM
  3045.     MOVE.L  A6,-(A7)
  3046.     MOVE.L  file_,D1
  3047.     MOVEA.L _DOSBase,A6
  3048.     JSR -216(A6)
  3049.     MOVEA.L (A7)+,A6
  3050.     TST.L   D0
  3051.     BEQ.B   @end
  3052.     MOVEQ   #1,D0
  3053.     @end: MOVE.B  D0,@RESULT
  3054.   END;
  3055. END;
  3056.  
  3057. FUNCTION LoadSeg(name : pCHAR) : LONGINT;
  3058. BEGIN
  3059.   ASM
  3060.     MOVE.L  A6,-(A7)
  3061.     MOVE.L  name,D1
  3062.     MOVEA.L _DOSBase,A6
  3063.     JSR -150(A6)
  3064.     MOVEA.L (A7)+,A6
  3065.     MOVE.L  D0,@RESULT
  3066.   END;
  3067. END;
  3068.  
  3069. FUNCTION Lock(name : pCHAR; type_ : LONGINT) : LONGINT;
  3070. BEGIN
  3071.   ASM
  3072.     MOVE.L  A6,-(A7)
  3073.     MOVE.L  name,D1
  3074.     MOVE.L  type_,D2
  3075.     MOVEA.L _DOSBase,A6
  3076.     JSR -084(A6)
  3077.     MOVEA.L (A7)+,A6
  3078.     MOVE.L  D0,@RESULT
  3079.   END;
  3080. END;
  3081.  
  3082. FUNCTION LockDosList(flags : ULONG) : pDosList;
  3083. BEGIN
  3084.   ASM
  3085.     MOVE.L  A6,-(A7)
  3086.     MOVE.L  flags,D1
  3087.     MOVEA.L _DOSBase,A6
  3088.     JSR -654(A6)
  3089.     MOVEA.L (A7)+,A6
  3090.     MOVE.L  D0,@RESULT
  3091.   END;
  3092. END;
  3093.  
  3094. FUNCTION LockRecord(fh : LONGINT; offset : ULONG; length : ULONG; mode : ULONG; timeout : ULONG) : BOOLEAN;
  3095. BEGIN
  3096.   ASM
  3097.     MOVE.L  A6,-(A7)
  3098.     MOVE.L  fh,D1
  3099.     MOVE.L  offset,D2
  3100.     MOVE.L  length,D3
  3101.     MOVE.L  mode,D4
  3102.     MOVE.L  timeout,D5
  3103.     MOVEA.L _DOSBase,A6
  3104.     JSR -270(A6)
  3105.     MOVEA.L (A7)+,A6
  3106.     TST.W   D0
  3107.     BEQ.B   @end
  3108.     MOVEQ   #1,D0
  3109.   @end: MOVE.B  D0,@RESULT
  3110.   END;
  3111. END;
  3112.  
  3113. FUNCTION LockRecords(recArray : pRecordLock; timeout : ULONG) : BOOLEAN;
  3114. BEGIN
  3115.   ASM
  3116.     MOVE.L  A6,-(A7)
  3117.     MOVE.L  recArray,D1
  3118.     MOVE.L  timeout,D2
  3119.     MOVEA.L _DOSBase,A6
  3120.     JSR -276(A6)
  3121.     MOVEA.L (A7)+,A6
  3122.     TST.W   D0
  3123.     BEQ.B   @end
  3124.     MOVEQ   #1,D0
  3125.   @end: MOVE.B  D0,@RESULT
  3126.   END;
  3127. END;
  3128.  
  3129. FUNCTION MakeDosEntry(name : pCHAR; type_ : LONGINT) : pDosList;
  3130. BEGIN
  3131.   ASM
  3132.     MOVE.L  A6,-(A7)
  3133.     MOVE.L  name,D1
  3134.     MOVE.L  type_,D2
  3135.     MOVEA.L _DOSBase,A6
  3136.     JSR -696(A6)
  3137.     MOVEA.L (A7)+,A6
  3138.     MOVE.L  D0,@RESULT
  3139.   END;
  3140. END;
  3141.  
  3142. FUNCTION MakeLink(name : pCHAR; dest : LONGINT; soft : LONGINT) : BOOLEAN;
  3143. BEGIN
  3144.   ASM
  3145.     MOVE.L  A6,-(A7)
  3146.     MOVE.L  name,D1
  3147.     MOVE.L  dest,D2
  3148.     MOVE.L  soft,D3
  3149.     MOVEA.L _DOSBase,A6
  3150.     JSR -444(A6)
  3151.     MOVEA.L (A7)+,A6
  3152.     TST.L   D0
  3153.     BEQ.B   @end
  3154.     MOVEQ   #1,D0
  3155.     @end: MOVE.B  D0,@RESULT
  3156.   END;
  3157. END;
  3158.  
  3159. PROCEDURE MatchEnd(anchor : pAnchorPath);
  3160. BEGIN
  3161.   ASM
  3162.     MOVE.L  A6,-(A7)
  3163.     MOVE.L  anchor,D1
  3164.     MOVEA.L _DOSBase,A6
  3165.     JSR -834(A6)
  3166.     MOVEA.L (A7)+,A6
  3167.   END;
  3168. END;
  3169.  
  3170. FUNCTION MatchFirst(pat : pCHAR; anchor : pAnchorPath) : LONGINT;
  3171. BEGIN
  3172.   ASM
  3173.     MOVE.L  A6,-(A7)
  3174.     MOVE.L  pat,D1
  3175.     MOVE.L  anchor,D2
  3176.     MOVEA.L _DOSBase,A6
  3177.     JSR -822(A6)
  3178.     MOVEA.L (A7)+,A6
  3179.     MOVE.L  D0,@RESULT
  3180.   END;
  3181. END;
  3182.  
  3183. FUNCTION MatchNext(anchor : pAnchorPath) : LONGINT;
  3184. BEGIN
  3185.   ASM
  3186.     MOVE.L  A6,-(A7)
  3187.     MOVE.L  anchor,D1
  3188.     MOVEA.L _DOSBase,A6
  3189.     JSR -828(A6)
  3190.     MOVEA.L (A7)+,A6
  3191.     MOVE.L  D0,@RESULT
  3192.   END;
  3193. END;
  3194.  
  3195. FUNCTION MatchPattern(pat : pCHAR; str : pCHAR) : BOOLEAN;
  3196. BEGIN
  3197.   ASM
  3198.     MOVE.L  A6,-(A7)
  3199.     MOVE.L  pat,D1
  3200.     MOVE.L  str,D2
  3201.     MOVEA.L _DOSBase,A6
  3202.     JSR -846(A6)
  3203.     MOVEA.L (A7)+,A6
  3204.     TST.W   D0
  3205.     BEQ.B   @end
  3206.     MOVEQ   #1,D0
  3207.   @end: MOVE.B  D0,@RESULT
  3208.   END;
  3209. END;
  3210.  
  3211. FUNCTION MatchPatternNoCase(pat : pCHAR; str : pCHAR) : BOOLEAN;
  3212. BEGIN
  3213.   ASM
  3214.     MOVE.L  A6,-(A7)
  3215.     MOVE.L  pat,D1
  3216.     MOVE.L  str,D2
  3217.     MOVEA.L _DOSBase,A6
  3218.     JSR -972(A6)
  3219.     MOVEA.L (A7)+,A6
  3220.     TST.W   D0
  3221.     BEQ.B   @end
  3222.     MOVEQ   #1,D0
  3223.   @end: MOVE.B  D0,@RESULT
  3224.   END;
  3225. END;
  3226.  
  3227. FUNCTION MaxCli : ULONG;
  3228. BEGIN
  3229.   ASM
  3230.     MOVE.L  A6,-(A7)
  3231.     MOVEA.L _DOSBase,A6
  3232.     JSR -552(A6)
  3233.     MOVEA.L (A7)+,A6
  3234.     MOVE.L  D0,@RESULT
  3235.   END;
  3236. END;
  3237.  
  3238. FUNCTION NameFromFH(fh : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  3239. BEGIN
  3240.   ASM
  3241.     MOVE.L  A6,-(A7)
  3242.     MOVE.L  fh,D1
  3243.     MOVE.L  buffer,D2
  3244.     MOVE.L  len,D3
  3245.     MOVEA.L _DOSBase,A6
  3246.     JSR -408(A6)
  3247.     MOVEA.L (A7)+,A6
  3248.     TST.L   D0
  3249.     BEQ.B   @end
  3250.     MOVEQ   #1,D0
  3251.     @end: MOVE.B  D0,@RESULT
  3252.   END;
  3253. END;
  3254.  
  3255. FUNCTION NameFromLock(lock : LONGINT; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  3256. BEGIN
  3257.   ASM
  3258.     MOVE.L  A6,-(A7)
  3259.     MOVE.L  lock,D1
  3260.     MOVE.L  buffer,D2
  3261.     MOVE.L  len,D3
  3262.     MOVEA.L _DOSBase,A6
  3263.     JSR -402(A6)
  3264.     MOVEA.L (A7)+,A6
  3265.     TST.L   D0
  3266.     BEQ.B   @end
  3267.     MOVEQ   #1,D0
  3268.     @end: MOVE.B  D0,@RESULT
  3269.   END;
  3270. END;
  3271.  
  3272. FUNCTION NewLoadSeg(file_ : pCHAR; tags : pTagItem) : LONGINT;
  3273. BEGIN
  3274.   ASM
  3275.     MOVE.L  A6,-(A7)
  3276.     MOVE.L  file_,D1
  3277.     MOVE.L  tags,D2
  3278.     MOVEA.L _DOSBase,A6
  3279.     JSR -768(A6)
  3280.     MOVEA.L (A7)+,A6
  3281.     MOVE.L  D0,@RESULT
  3282.   END;
  3283. END;
  3284.  
  3285. FUNCTION NewLoadSegTagList(file_ : pCHAR; tags : pTagItem) : LONGINT;
  3286. BEGIN
  3287.   ASM
  3288.     MOVE.L  A6,-(A7)
  3289.     MOVE.L  file_,D1
  3290.     MOVE.L  tags,D2
  3291.     MOVEA.L _DOSBase,A6
  3292.     JSR -768(A6)
  3293.     MOVEA.L (A7)+,A6
  3294.     MOVE.L  D0,@RESULT
  3295.   END;
  3296. END;
  3297.  
  3298. FUNCTION NextDosEntry(dlist : pDosList; flags : ULONG) : pDosList;
  3299. BEGIN
  3300.   ASM
  3301.     MOVE.L  A6,-(A7)
  3302.     MOVE.L  dlist,D1
  3303.     MOVE.L  flags,D2
  3304.     MOVEA.L _DOSBase,A6
  3305.     JSR -690(A6)
  3306.     MOVEA.L (A7)+,A6
  3307.     MOVE.L  D0,@RESULT
  3308.   END;
  3309. END;
  3310.  
  3311. FUNCTION OpenFromLock(lock : LONGINT) : LONGINT;
  3312. BEGIN
  3313.   ASM
  3314.     MOVE.L  A6,-(A7)
  3315.     MOVE.L  lock,D1
  3316.     MOVEA.L _DOSBase,A6
  3317.     JSR -378(A6)
  3318.     MOVEA.L (A7)+,A6
  3319.     MOVE.L  D0,@RESULT
  3320.   END;
  3321. END;
  3322.  
  3323. FUNCTION ParentDir(lock : LONGINT) : LONGINT;
  3324. BEGIN
  3325.   ASM
  3326.     MOVE.L  A6,-(A7)
  3327.     MOVE.L  lock,D1
  3328.     MOVEA.L _DOSBase,A6
  3329.     JSR -210(A6)
  3330.     MOVEA.L (A7)+,A6
  3331.     MOVE.L  D0,@RESULT
  3332.   END;
  3333. END;
  3334.  
  3335. FUNCTION ParentOfFH(fh : LONGINT) : LONGINT;
  3336. BEGIN
  3337.   ASM
  3338.     MOVE.L  A6,-(A7)
  3339.     MOVE.L  fh,D1
  3340.     MOVEA.L _DOSBase,A6
  3341.     JSR -384(A6)
  3342.     MOVEA.L (A7)+,A6
  3343.     MOVE.L  D0,@RESULT
  3344.   END;
  3345. END;
  3346.  
  3347. FUNCTION ParsePattern(pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT;
  3348. BEGIN
  3349.   ASM
  3350.     MOVE.L  A6,-(A7)
  3351.     MOVE.L  pat,D1
  3352.     MOVE.L  buf,D2
  3353.     MOVE.L  buflen,D3
  3354.     MOVEA.L _DOSBase,A6
  3355.     JSR -840(A6)
  3356.     MOVEA.L (A7)+,A6
  3357.     MOVE.L  D0,@RESULT
  3358.   END;
  3359. END;
  3360.  
  3361. FUNCTION ParsePatternNoCase(pat : pCHAR; buf : pCHAR; buflen : LONGINT) : LONGINT;
  3362. BEGIN
  3363.   ASM
  3364.     MOVE.L  A6,-(A7)
  3365.     MOVE.L  pat,D1
  3366.     MOVE.L  buf,D2
  3367.     MOVE.L  buflen,D3
  3368.     MOVEA.L _DOSBase,A6
  3369.     JSR -966(A6)
  3370.     MOVEA.L (A7)+,A6
  3371.     MOVE.L  D0,@RESULT
  3372.   END;
  3373. END;
  3374.  
  3375. FUNCTION PathPart(path : pCHAR) : pCHAR;
  3376. BEGIN
  3377.   ASM
  3378.     MOVE.L  A6,-(A7)
  3379.     MOVE.L  path,D1
  3380.     MOVEA.L _DOSBase,A6
  3381.     JSR -876(A6)
  3382.     MOVEA.L (A7)+,A6
  3383.     MOVE.L  D0,@RESULT
  3384.   END;
  3385. END;
  3386.  
  3387. FUNCTION PrintFault(code : LONGINT; header : pCHAR) : BOOLEAN;
  3388. BEGIN
  3389.   ASM
  3390.     MOVE.L  A6,-(A7)
  3391.     MOVE.L  code,D1
  3392.     MOVE.L  header,D2
  3393.     MOVEA.L _DOSBase,A6
  3394.     JSR -474(A6)
  3395.     MOVEA.L (A7)+,A6
  3396.     TST.W   D0
  3397.     BEQ.B   @end
  3398.     MOVEQ   #1,D0
  3399.   @end: MOVE.B  D0,@RESULT
  3400.   END;
  3401. END;
  3402.  
  3403. FUNCTION PutStr(str : pCHAR) : BOOLEAN;
  3404. BEGIN
  3405.   ASM
  3406.     MOVE.L  A6,-(A7)
  3407.     MOVE.L  str,D1
  3408.     MOVEA.L _DOSBase,A6
  3409.     JSR -948(A6)
  3410.     MOVEA.L (A7)+,A6
  3411.     TST.L   D0
  3412.     BEQ.B   @end
  3413.     MOVEQ   #1,D0
  3414.     @end: MOVE.B  D0,@RESULT
  3415.   END;
  3416. END;
  3417.  
  3418. FUNCTION ReadArgs(arg_template : pCHAR; var arra : pLONGINT; args : pRDArgs) : pRDArgs;
  3419. BEGIN
  3420.   ASM
  3421.     MOVE.L  A6,-(A7)
  3422.     MOVE.L  arg_template,D1
  3423.     MOVE.L  arra,D2
  3424.     MOVE.L  args,D3
  3425.     MOVEA.L _DOSBase,A6
  3426.     JSR -798(A6)
  3427.     MOVEA.L (A7)+,A6
  3428.     MOVE.L  D0,@RESULT
  3429.   END;
  3430. END;
  3431.  
  3432. FUNCTION ReadItem(name : pCHAR; maxchars : LONGINT; cSource : pCSource) : LONGINT;
  3433. BEGIN
  3434.   ASM
  3435.     MOVE.L  A6,-(A7)
  3436.     MOVE.L  name,D1
  3437.     MOVE.L  maxchars,D2
  3438.     MOVE.L  cSource,D3
  3439.     MOVEA.L _DOSBase,A6
  3440.     JSR -810(A6)
  3441.     MOVEA.L (A7)+,A6
  3442.     MOVE.L  D0,@RESULT
  3443.   END;
  3444. END;
  3445.  
  3446. FUNCTION ReadLink(port : pMsgPort; lock : LONGINT; path : pCHAR; buffer : pCHAR; size : ULONG) : BOOLEAN;
  3447. BEGIN
  3448.   ASM
  3449.     MOVE.L  A6,-(A7)
  3450.     MOVE.L  port,D1
  3451.     MOVE.L  lock,D2
  3452.     MOVE.L  path,D3
  3453.     MOVE.L  buffer,D4
  3454.     MOVE.L  size,D5
  3455.     MOVEA.L _DOSBase,A6
  3456.     JSR -438(A6)
  3457.     MOVEA.L (A7)+,A6
  3458.     TST.L   D0
  3459.     BEQ.B   @end
  3460.     MOVEQ   #1,D0
  3461.     @end: MOVE.B  D0,@RESULT
  3462.   END;
  3463. END;
  3464.  
  3465. FUNCTION Relabel(drive : pCHAR; newname : pCHAR) : BOOLEAN;
  3466. BEGIN
  3467.   ASM
  3468.     MOVE.L  A6,-(A7)
  3469.     MOVE.L  drive,D1
  3470.     MOVE.L  newname,D2
  3471.     MOVEA.L _DOSBase,A6
  3472.     JSR -720(A6)
  3473.     MOVEA.L (A7)+,A6
  3474.     TST.L   D0
  3475.     BEQ.B   @end
  3476.     MOVEQ   #1,D0
  3477.     @end: MOVE.B  D0,@RESULT
  3478.   END;
  3479. END;
  3480.  
  3481. FUNCTION RemAssignList(name : pCHAR; lock : LONGINT) : BOOLEAN;
  3482. BEGIN
  3483.   ASM
  3484.     MOVE.L  A6,-(A7)
  3485.     MOVE.L  name,D1
  3486.     MOVE.L  lock,D2
  3487.     MOVEA.L _DOSBase,A6
  3488.     JSR -636(A6)
  3489.     MOVEA.L (A7)+,A6
  3490.     TST.L   D0
  3491.     BEQ.B   @end
  3492.     MOVEQ   #1,D0
  3493.     @end: MOVE.B  D0,@RESULT
  3494.   END;
  3495. END;
  3496.  
  3497. FUNCTION RemDosEntry(dlist : pDosList) : BOOLEAN;
  3498. BEGIN
  3499.   ASM
  3500.     MOVE.L  A6,-(A7)
  3501.     MOVE.L  dlist,D1
  3502.     MOVEA.L _DOSBase,A6
  3503.     JSR -672(A6)
  3504.     MOVEA.L (A7)+,A6
  3505.     TST.W   D0
  3506.     BEQ.B   @end
  3507.     MOVEQ   #1,D0
  3508.   @end: MOVE.B  D0,@RESULT
  3509.   END;
  3510. END;
  3511.  
  3512. FUNCTION RemSegment(seg : pSegment) : BOOLEAN;
  3513. BEGIN
  3514.   ASM
  3515.     MOVE.L  A6,-(A7)
  3516.     MOVE.L  seg,D1
  3517.     MOVEA.L _DOSBase,A6
  3518.     JSR -786(A6)
  3519.     MOVEA.L (A7)+,A6
  3520.     TST.L   D0
  3521.     BEQ.B   @end
  3522.     MOVEQ   #1,D0
  3523.     @end: MOVE.B  D0,@RESULT
  3524.   END;
  3525. END;
  3526.  
  3527. PROCEDURE ReplyPkt(dp : pDosPacket; res1 : LONGINT; res2 : LONGINT);
  3528. BEGIN
  3529.   ASM
  3530.     MOVE.L  A6,-(A7)
  3531.     MOVE.L  dp,D1
  3532.     MOVE.L  res1,D2
  3533.     MOVE.L  res2,D3
  3534.     MOVEA.L _DOSBase,A6
  3535.     JSR -258(A6)
  3536.     MOVEA.L (A7)+,A6
  3537.   END;
  3538. END;
  3539.  
  3540. FUNCTION RunCommand(seg : LONGINT; stack : LONGINT; paramptr : pCHAR; paramlen : LONGINT) : LONGINT;
  3541. BEGIN
  3542.   ASM
  3543.     MOVE.L  A6,-(A7)
  3544.     MOVE.L  seg,D1
  3545.     MOVE.L  stack,D2
  3546.     MOVE.L  paramptr,D3
  3547.     MOVE.L  paramlen,D4
  3548.     MOVEA.L _DOSBase,A6
  3549.     JSR -504(A6)
  3550.     MOVEA.L (A7)+,A6
  3551.     MOVE.L  D0,@RESULT
  3552.   END;
  3553. END;
  3554.  
  3555. FUNCTION SameDevice(lock1 : LONGINT; lock2 : LONGINT) : BOOLEAN;
  3556. BEGIN
  3557.   ASM
  3558.     MOVE.L  A6,-(A7)
  3559.     MOVE.L  lock1,D1
  3560.     MOVE.L  lock2,D2
  3561.     MOVEA.L _DOSBase,A6
  3562.     JSR -984(A6)
  3563.     MOVEA.L (A7)+,A6
  3564.     TST.W   D0
  3565.     BEQ.B   @end
  3566.     MOVEQ   #1,D0
  3567.   @end: MOVE.B  D0,@RESULT
  3568.   END;
  3569. END;
  3570.  
  3571. FUNCTION SameLock(lock1 : LONGINT; lock2 : LONGINT) : LONGINT;
  3572. BEGIN
  3573.   ASM
  3574.     MOVE.L  A6,-(A7)
  3575.     MOVE.L  lock1,D1
  3576.     MOVE.L  lock2,D2
  3577.     MOVEA.L _DOSBase,A6
  3578.     JSR -420(A6)
  3579.     MOVEA.L (A7)+,A6
  3580.     MOVE.L  D0,@RESULT
  3581.   END;
  3582. END;
  3583.  
  3584. FUNCTION SelectInput(fh : LONGINT) : LONGINT;
  3585. BEGIN
  3586.   ASM
  3587.     MOVE.L  A6,-(A7)
  3588.     MOVE.L  fh,D1
  3589.     MOVEA.L _DOSBase,A6
  3590.     JSR -294(A6)
  3591.     MOVEA.L (A7)+,A6
  3592.     MOVE.L  D0,@RESULT
  3593.   END;
  3594. END;
  3595.  
  3596. FUNCTION SelectOutput(fh : LONGINT) : LONGINT;
  3597. BEGIN
  3598.   ASM
  3599.     MOVE.L  A6,-(A7)
  3600.     MOVE.L  fh,D1
  3601.     MOVEA.L _DOSBase,A6
  3602.     JSR -300(A6)
  3603.     MOVEA.L (A7)+,A6
  3604.     MOVE.L  D0,@RESULT
  3605.   END;
  3606. END;
  3607.  
  3608. PROCEDURE SendPkt(dp : pDosPacket; port : pMsgPort; replyport : pMsgPort);
  3609. BEGIN
  3610.   ASM
  3611.     MOVE.L  A6,-(A7)
  3612.     MOVE.L  dp,D1
  3613.     MOVE.L  port,D2
  3614.     MOVE.L  replyport,D3
  3615.     MOVEA.L _DOSBase,A6
  3616.     JSR -246(A6)
  3617.     MOVEA.L (A7)+,A6
  3618.   END;
  3619. END;
  3620.  
  3621. FUNCTION SetArgStr(string_ : pCHAR) : BOOLEAN;
  3622. BEGIN
  3623.   ASM
  3624.     MOVE.L  A6,-(A7)
  3625.     MOVE.L  string_,D1
  3626.     MOVEA.L _DOSBase,A6
  3627.     JSR -540(A6)
  3628.     MOVEA.L (A7)+,A6
  3629.     TST.W   D0
  3630.     BEQ.B   @end
  3631.     MOVEQ   #1,D0
  3632.   @end: MOVE.B  D0,@RESULT
  3633.   END;
  3634. END;
  3635.  
  3636. FUNCTION SetComment(name : pCHAR; comment : pCHAR) : BOOLEAN;
  3637. BEGIN
  3638.   ASM
  3639.     MOVE.L  A6,-(A7)
  3640.     MOVE.L  name,D1
  3641.     MOVE.L  comment,D2
  3642.     MOVEA.L _DOSBase,A6
  3643.     JSR -180(A6)
  3644.     MOVEA.L (A7)+,A6
  3645.     TST.L   D0
  3646.     BEQ.B   @end
  3647.     MOVEQ   #1,D0
  3648.     @end: MOVE.B  D0,@RESULT
  3649.   END;
  3650. END;
  3651.  
  3652. FUNCTION SetConsoleTask(task : pMsgPort) : pMsgPort;
  3653. BEGIN
  3654.   ASM
  3655.     MOVE.L  A6,-(A7)
  3656.     MOVE.L  task,D1
  3657.     MOVEA.L _DOSBase,A6
  3658.     JSR -516(A6)
  3659.     MOVEA.L (A7)+,A6
  3660.     MOVE.L  D0,@RESULT
  3661.   END;
  3662. END;
  3663.  
  3664. FUNCTION SetCurrentDirName(name : pCHAR) : BOOLEAN;
  3665. BEGIN
  3666.   ASM
  3667.     MOVE.L  A6,-(A7)
  3668.     MOVE.L  name,D1
  3669.     MOVEA.L _DOSBase,A6
  3670.     JSR -558(A6)
  3671.     MOVEA.L (A7)+,A6
  3672.     TST.W   D0
  3673.     BEQ.B   @end
  3674.     MOVEQ   #1,D0
  3675.   @end: MOVE.B  D0,@RESULT
  3676.   END;
  3677. END;
  3678.  
  3679. FUNCTION SetFileDate(name : pCHAR; date : pDateStamp) : BOOLEAN;
  3680. BEGIN
  3681.   ASM
  3682.     MOVE.L  A6,-(A7)
  3683.     MOVE.L  name,D1
  3684.     MOVE.L  date,D2
  3685.     MOVEA.L _DOSBase,A6
  3686.     JSR -396(A6)
  3687.     MOVEA.L (A7)+,A6
  3688.     TST.L   D0
  3689.     BEQ.B   @end
  3690.     MOVEQ   #1,D0
  3691.     @end: MOVE.B  D0,@RESULT
  3692.   END;
  3693. END;
  3694.  
  3695. FUNCTION SetFileSize(fh : LONGINT; pos : LONGINT; mode : LONGINT) : BOOLEAN;
  3696. BEGIN
  3697.   ASM
  3698.     MOVE.L  A6,-(A7)
  3699.     MOVE.L  fh,D1
  3700.     MOVE.L  pos,D2
  3701.     MOVE.L  mode,D3
  3702.     MOVEA.L _DOSBase,A6
  3703.     JSR -456(A6)
  3704.     MOVEA.L (A7)+,A6
  3705.     TST.L   D0
  3706.     BEQ.B   @end
  3707.     MOVEQ   #1,D0
  3708.     @end: MOVE.B  D0,@RESULT
  3709.   END;
  3710. END;
  3711.  
  3712. FUNCTION SetFileSysTask(task : pMsgPort) : pMsgPort;
  3713. BEGIN
  3714.   ASM
  3715.     MOVE.L  A6,-(A7)
  3716.     MOVE.L  task,D1
  3717.     MOVEA.L _DOSBase,A6
  3718.     JSR -528(A6)
  3719.     MOVEA.L (A7)+,A6
  3720.     MOVE.L  D0,@RESULT
  3721.   END;
  3722. END;
  3723.  
  3724. FUNCTION SetIoErr(result : LONGINT) : LONGINT;
  3725. BEGIN
  3726.   ASM
  3727.     MOVE.L  A6,-(A7)
  3728.     MOVE.L  result,D1
  3729.     MOVEA.L _DOSBase,A6
  3730.     JSR -462(A6)
  3731.     MOVEA.L (A7)+,A6
  3732.     MOVE.L  D0,@RESULT
  3733.   END;
  3734. END;
  3735.  
  3736. FUNCTION SetMode(fh : LONGINT; mode : LONGINT) : BOOLEAN;
  3737. BEGIN
  3738.   ASM
  3739.     MOVE.L  A6,-(A7)
  3740.     MOVE.L  fh,D1
  3741.     MOVE.L  mode,D2
  3742.     MOVEA.L _DOSBase,A6
  3743.     JSR -426(A6)
  3744.     MOVEA.L (A7)+,A6
  3745.     TST.L   D0
  3746.     BEQ.B   @end
  3747.     MOVEQ   #1,D0
  3748.     @end: MOVE.B  D0,@RESULT
  3749.   END;
  3750. END;
  3751.  
  3752. FUNCTION SetOwner(name : pCHAR; owner_info : LONGINT) : BOOLEAN;
  3753. BEGIN
  3754.   ASM
  3755.     MOVE.L  A6,-(A7)
  3756.     MOVE.L  name,D1
  3757.     MOVE.L  owner_info,D2
  3758.     MOVEA.L _DOSBase,A6
  3759.     JSR -996(A6)
  3760.     MOVEA.L (A7)+,A6
  3761.     TST.W   D0
  3762.     BEQ.B   @end
  3763.     MOVEQ   #1,D0
  3764.   @end: MOVE.B  D0,@RESULT
  3765.   END;
  3766. END;
  3767.  
  3768. FUNCTION SetProgramDir(lock : LONGINT) : LONGINT;
  3769. BEGIN
  3770.   ASM
  3771.     MOVE.L  A6,-(A7)
  3772.     MOVE.L  lock,D1
  3773.     MOVEA.L _DOSBase,A6
  3774.     JSR -594(A6)
  3775.     MOVEA.L (A7)+,A6
  3776.     MOVE.L  D0,@RESULT
  3777.   END;
  3778. END;
  3779.  
  3780. FUNCTION SetProgramName(name : pCHAR) : BOOLEAN;
  3781. BEGIN
  3782.   ASM
  3783.     MOVE.L  A6,-(A7)
  3784.     MOVE.L  name,D1
  3785.     MOVEA.L _DOSBase,A6
  3786.     JSR -570(A6)
  3787.     MOVEA.L (A7)+,A6
  3788.     TST.W   D0
  3789.     BEQ.B   @end
  3790.     MOVEQ   #1,D0
  3791.   @end: MOVE.B  D0,@RESULT
  3792.   END;
  3793. END;
  3794.  
  3795. FUNCTION SetPrompt(name : pCHAR) : BOOLEAN;
  3796. BEGIN
  3797.   ASM
  3798.     MOVE.L  A6,-(A7)
  3799.     MOVE.L  name,D1
  3800.     MOVEA.L _DOSBase,A6
  3801.     JSR -582(A6)
  3802.     MOVEA.L (A7)+,A6
  3803.     TST.W   D0
  3804.     BEQ.B   @end
  3805.     MOVEQ   #1,D0
  3806.   @end: MOVE.B  D0,@RESULT
  3807.   END;
  3808. END;
  3809.  
  3810. FUNCTION SetProtection(name : pCHAR; protect : LONGINT) : BOOLEAN;
  3811. BEGIN
  3812.   ASM
  3813.     MOVE.L  A6,-(A7)
  3814.     MOVE.L  name,D1
  3815.     MOVE.L  protect,D2
  3816.     MOVEA.L _DOSBase,A6
  3817.     JSR -186(A6)
  3818.     MOVEA.L (A7)+,A6
  3819.     TST.L   D0
  3820.     BEQ.B   @end
  3821.     MOVEQ   #1,D0
  3822.     @end: MOVE.B  D0,@RESULT
  3823.   END;
  3824. END;
  3825.  
  3826. FUNCTION SetVar(name : pCHAR; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
  3827. BEGIN
  3828.   ASM
  3829.     MOVE.L  A6,-(A7)
  3830.     MOVE.L  name,D1
  3831.     MOVE.L  buffer,D2
  3832.     MOVE.L  size,D3
  3833.     MOVE.L  flags,D4
  3834.     MOVEA.L _DOSBase,A6
  3835.     JSR -900(A6)
  3836.     MOVEA.L (A7)+,A6
  3837.     TST.W   D0
  3838.     BEQ.B   @end
  3839.     MOVEQ   #1,D0
  3840.   @end: MOVE.B  D0,@RESULT
  3841.   END;
  3842. END;
  3843.  
  3844. FUNCTION SetVBuf(fh : LONGINT; buff : pCHAR; type_ : LONGINT; size : LONGINT) : BOOLEAN;
  3845. BEGIN
  3846.   ASM
  3847.     MOVE.L  A6,-(A7)
  3848.     MOVE.L  fh,D1
  3849.     MOVE.L  buff,D2
  3850.     MOVE.L  type_,D3
  3851.     MOVE.L  size,D4
  3852.     MOVEA.L _DOSBase,A6
  3853.     JSR -366(A6)
  3854.     MOVEA.L (A7)+,A6
  3855.     TST.L   D0
  3856.     BEQ.B   @end
  3857.     MOVEQ   #1,D0
  3858.     @end: MOVE.B  D0,@RESULT
  3859.   END;
  3860. END;
  3861.  
  3862. FUNCTION SplitName(name : pCHAR; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
  3863. BEGIN
  3864.   ASM
  3865.     MOVE.L  A6,-(A7)
  3866.     MOVE.L  name,D1
  3867.     MOVE.L  seperator,D2
  3868.     MOVE.L  buf,D3
  3869.     MOVE.L  oldpos,D4
  3870.     MOVE.L  size,D5
  3871.     MOVEA.L _DOSBase,A6
  3872.     JSR -414(A6)
  3873.     MOVEA.L (A7)+,A6
  3874.     MOVE.L  D0,@RESULT
  3875.   END;
  3876. END;
  3877.  
  3878. FUNCTION StartNotify(notify : pNotifyRequest) : BOOLEAN;
  3879. BEGIN
  3880.   ASM
  3881.     MOVE.L  A6,-(A7)
  3882.     MOVE.L  notify,D1
  3883.     MOVEA.L _DOSBase,A6
  3884.     JSR -888(A6)
  3885.     MOVEA.L (A7)+,A6
  3886.     TST.W   D0
  3887.     BEQ.B   @end
  3888.     MOVEQ   #1,D0
  3889.   @end: MOVE.B  D0,@RESULT
  3890.   END;
  3891. END;
  3892.  
  3893. FUNCTION StrToDate(datetime : pDateTime) : BOOLEAN;
  3894. BEGIN
  3895.   ASM
  3896.     MOVE.L  A6,-(A7)
  3897.     MOVE.L  datetime,D1
  3898.     MOVEA.L _DOSBase,A6
  3899.     JSR -750(A6)
  3900.     MOVEA.L (A7)+,A6
  3901.     TST.L   D0
  3902.     BEQ.B   @end
  3903.     MOVEQ   #1,D0
  3904.     @end: MOVE.B  D0,@RESULT
  3905.   END;
  3906. END;
  3907.  
  3908. FUNCTION StrToLong(string_ : pCHAR; VAR value : LONGINT) : LONGINT;
  3909. BEGIN
  3910.   ASM
  3911.     MOVE.L  A6,-(A7)
  3912.     MOVE.L  string_,D1
  3913.     MOVE.L  value,D2
  3914.     MOVEA.L _DOSBase,A6
  3915.     JSR -816(A6)
  3916.     MOVEA.L (A7)+,A6
  3917.     MOVE.L  D0,@RESULT
  3918.   END;
  3919. END;
  3920.  
  3921. FUNCTION SystemTagList(command : pCHAR; tags : pTagItem) : LONGINT;
  3922. BEGIN
  3923.   ASM
  3924.     MOVE.L  A6,-(A7)
  3925.     MOVE.L  command,D1
  3926.     MOVE.L  tags,D2
  3927.     MOVEA.L _DOSBase,A6
  3928.     JSR -606(A6)
  3929.     MOVEA.L (A7)+,A6
  3930.     MOVE.L  D0,@RESULT
  3931.   END;
  3932. END;
  3933.  
  3934. FUNCTION DOSSystem(command : pCHAR; tags : pTagItem) : LONGINT;
  3935. BEGIN
  3936.   ASM
  3937.     MOVE.L  A6,-(A7)
  3938.     MOVE.L  command,D1
  3939.     MOVE.L  tags,D2
  3940.     MOVEA.L _DOSBase,A6
  3941.     JSR -606(A6)
  3942.     MOVEA.L (A7)+,A6
  3943.     MOVE.L  D0,@RESULT
  3944.   END;
  3945. END;
  3946.  
  3947. FUNCTION UnGetC(fh : LONGINT; character : LONGINT) : LONGINT;
  3948. BEGIN
  3949.   ASM
  3950.     MOVE.L  A6,-(A7)
  3951.     MOVE.L  fh,D1
  3952.     MOVE.L  character,D2
  3953.     MOVEA.L _DOSBase,A6
  3954.     JSR -318(A6)
  3955.     MOVEA.L (A7)+,A6
  3956.     MOVE.L  D0,@RESULT
  3957.   END;
  3958. END;
  3959.  
  3960. PROCEDURE UnLoadSeg(seglist : LONGINT);
  3961. BEGIN
  3962.   ASM
  3963.     MOVE.L  A6,-(A7)
  3964.     MOVE.L  seglist,D1
  3965.     MOVEA.L _DOSBase,A6
  3966.     JSR -156(A6)
  3967.     MOVEA.L (A7)+,A6
  3968.   END;
  3969. END;
  3970.  
  3971. PROCEDURE UnLock(lock : LONGINT);
  3972. BEGIN
  3973.   ASM
  3974.     MOVE.L  A6,-(A7)
  3975.     MOVE.L  lock,D1
  3976.     MOVEA.L _DOSBase,A6
  3977.     JSR -090(A6)
  3978.     MOVEA.L (A7)+,A6
  3979.   END;
  3980. END;
  3981.  
  3982. PROCEDURE UnLockDosList(flags : ULONG);
  3983. BEGIN
  3984.   ASM
  3985.     MOVE.L  A6,-(A7)
  3986.     MOVE.L  flags,D1
  3987.     MOVEA.L _DOSBase,A6
  3988.     JSR -660(A6)
  3989.     MOVEA.L (A7)+,A6
  3990.   END;
  3991. END;
  3992.  
  3993. FUNCTION UnLockRecord(fh : LONGINT; offset : ULONG; length : ULONG) : BOOLEAN;
  3994. BEGIN
  3995.   ASM
  3996.     MOVE.L  A6,-(A7)
  3997.     MOVE.L  fh,D1
  3998.     MOVE.L  offset,D2
  3999.     MOVE.L  length,D3
  4000.     MOVEA.L _DOSBase,A6
  4001.     JSR -282(A6)
  4002.     MOVEA.L (A7)+,A6
  4003.     TST.W   D0
  4004.     BEQ.B   @end
  4005.     MOVEQ   #1,D0
  4006.   @end: MOVE.B  D0,@RESULT
  4007.   END;
  4008. END;
  4009.  
  4010. FUNCTION UnLockRecords(recArray : pRecordLock) : BOOLEAN;
  4011. BEGIN
  4012.   ASM
  4013.     MOVE.L  A6,-(A7)
  4014.     MOVE.L  recArray,D1
  4015.     MOVEA.L _DOSBase,A6
  4016.     JSR -288(A6)
  4017.     MOVEA.L (A7)+,A6
  4018.     TST.W   D0
  4019.     BEQ.B   @end
  4020.     MOVEQ   #1,D0
  4021.   @end: MOVE.B  D0,@RESULT
  4022.   END;
  4023. END;
  4024.  
  4025. FUNCTION VFPrintf(fh : LONGINT; format : pCHAR; argarray : POINTER) : LONGINT;
  4026. BEGIN
  4027.   ASM
  4028.     MOVE.L  A6,-(A7)
  4029.     MOVE.L  fh,D1
  4030.     MOVE.L  format,D2
  4031.     MOVE.L  argarray,D3
  4032.     MOVEA.L _DOSBase,A6
  4033.     JSR -354(A6)
  4034.     MOVEA.L (A7)+,A6
  4035.     MOVE.L  D0,@RESULT
  4036.   END;
  4037. END;
  4038.  
  4039. PROCEDURE VFWritef(fh : LONGINT; format : pCHAR; VAR argarray : LONGINT);
  4040. BEGIN
  4041.   ASM
  4042.     MOVE.L  A6,-(A7)
  4043.     MOVE.L  fh,D1
  4044.     MOVE.L  format,D2
  4045.     MOVE.L  argarray,D3
  4046.     MOVEA.L _DOSBase,A6
  4047.     JSR -348(A6)
  4048.     MOVEA.L (A7)+,A6
  4049.   END;
  4050. END;
  4051.  
  4052. FUNCTION VPrintf(format : pCHAR; argarray : POINTER) : LONGINT;
  4053. BEGIN
  4054.   ASM
  4055.     MOVE.L  A6,-(A7)
  4056.     MOVE.L  format,D1
  4057.     MOVE.L  argarray,D2
  4058.     MOVEA.L _DOSBase,A6
  4059.     JSR -954(A6)
  4060.     MOVEA.L (A7)+,A6
  4061.     MOVE.L  D0,@RESULT
  4062.   END;
  4063. END;
  4064.  
  4065. FUNCTION WaitForChar(file_ : LONGINT; timeout : LONGINT) : BOOLEAN;
  4066. BEGIN
  4067.   ASM
  4068.     MOVE.L  A6,-(A7)
  4069.     MOVE.L  file_,D1
  4070.     MOVE.L  timeout,D2
  4071.     MOVEA.L _DOSBase,A6
  4072.     JSR -204(A6)
  4073.     MOVEA.L (A7)+,A6
  4074.     TST.L   D0
  4075.     BEQ.B   @end
  4076.     MOVEQ   #1,D0
  4077.     @end: MOVE.B  D0,@RESULT
  4078.   END;
  4079. END;
  4080.  
  4081. FUNCTION WaitPkt : pDosPacket;
  4082. BEGIN
  4083.   ASM
  4084.     MOVE.L  A6,-(A7)
  4085.     MOVEA.L _DOSBase,A6
  4086.     JSR -252(A6)
  4087.     MOVEA.L (A7)+,A6
  4088.     MOVE.L  D0,@RESULT
  4089.   END;
  4090. END;
  4091.  
  4092. FUNCTION WriteChars(buf : pCHAR; buflen : ULONG) : LONGINT;
  4093. BEGIN
  4094.   ASM
  4095.     MOVE.L  A6,-(A7)
  4096.     MOVE.L  buf,D1
  4097.     MOVE.L  buflen,D2
  4098.     MOVEA.L _DOSBase,A6
  4099.     JSR -942(A6)
  4100.     MOVEA.L (A7)+,A6
  4101.     MOVE.L  D0,@RESULT
  4102.   END;
  4103. END;
  4104.  
  4105. {$ifdef amiga_overlays}
  4106.  
  4107. FUNCTION AddBuffers(name : string; number : LONGINT) : BOOLEAN;
  4108. begin
  4109.      AddBuffers := AddBuffers(pas2c(name), number);
  4110. end;
  4111.  
  4112. FUNCTION AddPart(dirname : string; filename : pCHAR; size : ULONG) : BOOLEAN;
  4113. begin
  4114.      AddPart := AddPart(pas2c(dirname),filename,size);
  4115. end;
  4116.  
  4117. FUNCTION AddPart(dirname : pCHAR; filename : string; size : ULONG) : BOOLEAN;
  4118. begin
  4119.      AddPart := AddPart(dirname,pas2c(filename),size);
  4120. end;
  4121.  
  4122. FUNCTION AddPart(dirname : string; filename : string; size : ULONG) : BOOLEAN;
  4123. begin
  4124.      AddPart := AddPart(pas2c(dirname),pas2c(filename),size);
  4125. end;
  4126.  
  4127. FUNCTION AssignAdd(name : string; lock : LONGINT) : BOOLEAN;
  4128. begin
  4129.      AssignAdd := AssignAdd(pas2c(name),lock);
  4130. end;
  4131.  
  4132. FUNCTION AssignLate(name : string; path : pCHAR) : BOOLEAN;
  4133. begin
  4134.      AssignLate := AssignLate(pas2c(name),path);
  4135. end;
  4136.  
  4137. FUNCTION AssignLate(name : pChar; path : string) : BOOLEAN;
  4138. begin
  4139.      AssignLate := AssignLate(name,pas2c(path));
  4140. end;
  4141.  
  4142. FUNCTION AssignLate(name : string; path : string) : BOOLEAN;
  4143. begin
  4144.      AssignLate := AssignLate(pas2c(name),pas2c(path));
  4145. end;
  4146.  
  4147. FUNCTION AssignLock(name : string; lock : LONGINT) : BOOLEAN;
  4148. begin
  4149.      AssignLock := AssignLock(pas2c(name),lock);
  4150. end;
  4151.  
  4152. FUNCTION AssignPath(name : string; path : pCHAR) : BOOLEAN;
  4153. begin
  4154.      AssignPath := AssignPath(pas2c(name),path);
  4155. end;
  4156.  
  4157. FUNCTION AssignPath(name : pCHAR; path : string) : BOOLEAN;
  4158. begin
  4159.      AssignPath := AssignPath(name,pas2c(path));
  4160. end;
  4161.  
  4162. FUNCTION AssignPath(name : string; path : string) : BOOLEAN;
  4163. begin
  4164.      AssignPath := AssignPath(pas2c(name),pas2c(path));
  4165. end;
  4166.  
  4167. FUNCTION CreateDir(name : string) : LONGINT;
  4168. begin
  4169.      CreateDir := CreateDir(pas2c(name));
  4170. end;
  4171.  
  4172. FUNCTION CreateProc(name : string; pri : LONGINT; segList : LONGINT; stackSize : LONGINT) : pMsgPort;
  4173. begin
  4174.      CreateProc := CreateProc(pas2c(name),pri,segList,stackSize);
  4175. end;
  4176.  
  4177. FUNCTION DeleteFile(name : string) : BOOLEAN;
  4178. begin
  4179.      DeleteFile := DeleteFile(pas2c(name));
  4180. end;
  4181.  
  4182. FUNCTION DeleteVar(name : string; flags : ULONG) : BOOLEAN;
  4183. begin
  4184.      DeleteVar := DeleteVar(pas2c(name),flags);
  4185. end;
  4186.  
  4187. FUNCTION DeviceProc(name : string) : pMsgPort;
  4188. begin
  4189.      Deviceproc := DeviceProc(pas2c(name));
  4190. end;
  4191.  
  4192. FUNCTION DOSOpen(name : string; accessMode : LONGINT) : LONGINT;
  4193. begin
  4194.      DOSOpen := DOSOpen(pas2c(name),accessMode);
  4195. end;
  4196.  
  4197. FUNCTION DOSRename(oldName : string; newName : pCHAR) : LONGINT;
  4198. begin
  4199.      DOSRename := DOSRename(pas2c(oldName),newName);
  4200. end;
  4201.  
  4202. FUNCTION DOSRename(oldName : pCHAR; newName : string) : LONGINT;
  4203. begin
  4204.      DOSRename := DOSRename(oldName,pas2c(newName));
  4205. end;
  4206.  
  4207. FUNCTION DOSRename(oldName : string; newName : string) : LONGINT;
  4208. begin
  4209.      DOSRename := DOSRename(pas2c(oldName),pas2c(newName));
  4210. end;
  4211.  
  4212. FUNCTION Execute(string_ : string; file_ : LONGINT; file2 : LONGINT) : BOOLEAN;
  4213. begin
  4214.      Execute := Execute(pas2c(string_),file_ ,file2);
  4215. end;
  4216.  
  4217. FUNCTION Fault(code : LONGINT; header : string; buffer : pCHAR; len : LONGINT) : BOOLEAN;
  4218. begin
  4219.     Fault := Fault(code,pas2c(header),buffer,len);
  4220. end;
  4221.  
  4222. FUNCTION FilePart(path : string) : pCHAR;
  4223. begin
  4224.     FilePart := FilePart(pas2c(path));
  4225. end;
  4226.  
  4227. FUNCTION FindArg(keyword : string; arg_template : pCHAR) : LONGINT;
  4228. begin
  4229.     FindArg := FindArg(pas2c(keyword),arg_template);
  4230. end;
  4231.  
  4232. FUNCTION FindArg(keyword : pCHAR; arg_template : string) : LONGINT;
  4233. begin
  4234.     FindArg := FindArg(keyword,pas2c(arg_template));
  4235. end;
  4236.  
  4237. FUNCTION FindArg(keyword : string; arg_template : string) : LONGINT;
  4238. begin
  4239.     FindArg := FindArg(pas2c(keyword),pas2c(arg_template));
  4240. end;
  4241.  
  4242. FUNCTION FindDosEntry(dlist : pDosList; name : string; flags : ULONG) : pDosList;
  4243. begin
  4244.     FindDosEntry := FindDosEntry(dlist,pas2c(name),flags);
  4245. end;
  4246.  
  4247. FUNCTION FindSegment(name : string; seg : pSegment; system : LONGINT) : pSegment;
  4248. begin
  4249.     FindSegment := FindSegment(pas2c(name),seg,system);
  4250. end;
  4251.  
  4252. FUNCTION FindVar(name : string; type_ : ULONG) : pLocalVar;
  4253. begin
  4254.     FindVar := FindVar(pas2c(name),type_);
  4255. end;
  4256.  
  4257. FUNCTION Format(filesystem : string; volumename : pCHAR; dostype : ULONG) : BOOLEAN;
  4258. begin
  4259.     Format := Format(pas2c(filesystem),volumename,dostype);
  4260. end;
  4261.  
  4262. FUNCTION Format(filesystem : pCHAR; volumename : string; dostype : ULONG) : BOOLEAN;
  4263. begin
  4264.     Format := Format(filesystem,pas2c(volumename),dostype);
  4265. end;
  4266.  
  4267. FUNCTION Format(filesystem : string; volumename : string; dostype : ULONG) : BOOLEAN;
  4268. begin
  4269.     Format := Format(pas2c(filesystem),pas2c(volumename),dostype);
  4270. end;
  4271.  
  4272. FUNCTION FPuts(fh : LONGINT; str : string) : BOOLEAN;
  4273. begin
  4274.     FPuts := FPuts(fh,pas2c(str));
  4275. end;
  4276.  
  4277. FUNCTION GetDeviceProc(name : string; dp : pDevProc) : pDevProc;
  4278. begin
  4279.     GetDeviceProc := GetDeviceProc(pas2c(name),dp);
  4280. end;
  4281.  
  4282. FUNCTION GetVar(name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : LONGINT;
  4283. begin
  4284.     GetVar := GetVar(pas2c(name),buffer,size,flags);
  4285. end;
  4286.  
  4287. FUNCTION Inhibit(name : string; onoff : LONGINT) : BOOLEAN;
  4288. begin
  4289.     Inhibit := Inhibit(pas2c(name),onoff);
  4290. end;
  4291.  
  4292. FUNCTION IsFileSystem(name : string) : BOOLEAN;
  4293. begin
  4294.     IsFileSystem := IsFileSystem(pas2c(name));
  4295. end;
  4296.  
  4297. FUNCTION LoadSeg(name : string) : LONGINT;
  4298. begin
  4299.     LoadSeg := LoadSeg(pas2c(name));
  4300. end;
  4301.  
  4302. FUNCTION Lock(name : string; type_ : LONGINT) : LONGINT;
  4303. begin
  4304.     Lock := Lock(pas2c(name),type_);
  4305. end;
  4306.  
  4307. FUNCTION MakeDosEntry(name : string; type_ : LONGINT) : pDosList;
  4308. begin
  4309.     MakeDosEntry := MakeDosEntry(pas2c(name),type_);
  4310. end;
  4311.  
  4312. FUNCTION MakeLink(name : string; dest : LONGINT; soft : LONGINT) : BOOLEAN;
  4313. begin
  4314.     MakeLink := MakeLink(pas2c(name),dest,soft);
  4315. end;
  4316.  
  4317. FUNCTION MatchFirst(pat : string; anchor : pAnchorPath) : LONGINT;
  4318. begin
  4319.     MatchFirst := MatchFirst(pas2c(pat),anchor);
  4320. end;
  4321.  
  4322. FUNCTION MatchPattern(pat : string; str : pCHAR) : BOOLEAN;
  4323. begin
  4324.     MatchPattern := MatchPattern(pas2c(pat),str);
  4325. end;
  4326.  
  4327. FUNCTION MatchPattern(pat : pCHAR; str : string) : BOOLEAN;
  4328. begin
  4329.     MatchPattern := MatchPattern(pat,pas2c(str));
  4330. end;
  4331.  
  4332. FUNCTION MatchPattern(pat : string; str : string) : BOOLEAN;
  4333. begin
  4334.     MatchPattern := MatchPattern(pas2c(pat),pas2c(str));
  4335. end;
  4336.  
  4337. FUNCTION MatchPatternNoCase(pat : string; str : pCHAR) : BOOLEAN;
  4338. begin
  4339.     MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),str); 
  4340. end;
  4341.  
  4342. FUNCTION MatchPatternNoCase(pat : pCHAR; str : string) : BOOLEAN;
  4343. begin
  4344.     MatchPatternNoCase := MatchPatternNoCase(pat,pas2c(str));
  4345. end;
  4346.  
  4347. FUNCTION MatchPatternNoCase(pat : string; str : string) : BOOLEAN;
  4348. begin
  4349.     MatchPatternNoCase := MatchPatternNoCase(pas2c(pat),pas2c(str));
  4350. end;
  4351.  
  4352. FUNCTION NewLoadSeg(file_ : string; tags : pTagItem) : LONGINT;
  4353. begin
  4354.     NewLoadSeg := NewLoadSeg(pas2c(file_),tags);
  4355. end;
  4356.  
  4357. FUNCTION NewLoadSegTagList(file_ : string; tags : pTagItem) : LONGINT;
  4358. begin
  4359.     NewLoadSegTagList := NewLoadSegTagList(pas2c(file_),tags);
  4360. end;
  4361.  
  4362. FUNCTION PathPart(path : string) : pCHAR;
  4363. begin
  4364.     PathPart := PathPart(pas2c(path));
  4365. end;
  4366.  
  4367. FUNCTION PrintFault(code : LONGINT; header : string) : BOOLEAN;
  4368. begin
  4369.     PrintFault := PrintFault(code,pas2c(header));
  4370. end;
  4371.  
  4372. FUNCTION PutStr(str : string) : BOOLEAN;
  4373. begin
  4374.     PutStr := PutStr(pas2c(str));
  4375. end;
  4376.  
  4377. FUNCTION ReadArgs(arg_template : string; var arra : pLONGINT; args : pRDArgs) : pRDArgs;
  4378. begin
  4379.     ReadArgs := ReadArgs(pas2c(arg_template),arra,args);
  4380. end;
  4381.  
  4382. FUNCTION ReadItem(name : string; maxchars : LONGINT; cSource : pCSource) : LONGINT;
  4383. begin
  4384.     ReadItem := ReadItem(pas2c(name),maxchars,cSource);
  4385. end;
  4386.  
  4387. FUNCTION ReadLink(port : pMsgPort; lock : LONGINT; path : string; buffer : pCHAR; size : ULONG) : BOOLEAN;
  4388. begin
  4389.     ReadLink := ReadLink(port,lock,pas2c(path),buffer,size);
  4390. end;
  4391.  
  4392. FUNCTION Relabel(drive : string; newname : pCHAR) : BOOLEAN;
  4393. begin
  4394.     Relabel := Relabel(pas2c(drive),newname);
  4395. end;
  4396.  
  4397. FUNCTION Relabel(drive : pCHAR; newname : string) : BOOLEAN;
  4398. begin
  4399.     Relabel := Relabel(drive,pas2c(newname));
  4400. end;
  4401.  
  4402. FUNCTION Relabel(drive : string; newname : string) : BOOLEAN;
  4403. begin
  4404.     Relabel := Relabel(pas2c(drive),pas2c(newname));
  4405. end;
  4406.  
  4407. FUNCTION RemAssignList(name : string; lock : LONGINT) : BOOLEAN;
  4408. begin
  4409.     RemAssignList := RemAssignList(pas2c(name),lock);
  4410. end;
  4411.  
  4412. FUNCTION RunCommand(seg : LONGINT; stack : LONGINT; paramptr : string; paramlen : LONGINT) : LONGINT;
  4413. begin
  4414.     RunCommand := RunCommand(seg,stack,pas2c(paramptr),paramlen);
  4415. end;
  4416.  
  4417. FUNCTION SetArgStr(string_ : string) : BOOLEAN;
  4418. begin
  4419.     SetArgStr := SetArgStr(pas2c(string_));
  4420. end;
  4421.  
  4422. FUNCTION SetComment(name : string; comment : pCHAR) : BOOLEAN;
  4423. begin
  4424.     SetComment := SetComment(pas2c(name),comment);
  4425. end;
  4426.  
  4427. FUNCTION SetComment(name : pCHAR; comment : string) : BOOLEAN;
  4428. begin
  4429.     SetComment := SetComment(name,pas2c(comment));
  4430. end;
  4431.  
  4432. FUNCTION SetComment(name : string; comment : string) : BOOLEAN;
  4433. begin
  4434.     SetComment := SetComment(pas2c(name),pas2c(comment)); 
  4435. end;
  4436.  
  4437. FUNCTION SetCurrentDirName(name : string) : BOOLEAN;
  4438. begin
  4439.      SetCurrentDirName := SetCurrentDirName(pas2c(name));
  4440. end;
  4441.  
  4442. FUNCTION SetFileDate(name : string; date : pDateStamp) : BOOLEAN;
  4443. begin
  4444.      SetFileDate := SetFileDate(pas2c(name),date);
  4445. end;
  4446.  
  4447. FUNCTION SetOwner(name : string; owner_info : LONGINT) : BOOLEAN;
  4448. begin
  4449.      SetOwner := SetOwner(pas2c(name),owner_info);
  4450. end;
  4451.  
  4452. FUNCTION SetProgramName(name : string) : BOOLEAN;
  4453. begin
  4454.      SetProgramName := SetProgramName(pas2c(name));
  4455. end;
  4456.  
  4457. FUNCTION SetPrompt(name : string) : BOOLEAN;
  4458. begin
  4459.      SetPrompt := SetPrompt(pas2c(name));
  4460. end;
  4461.  
  4462. FUNCTION SetProtection(name : string; protect : LONGINT) : BOOLEAN;
  4463. begin
  4464.      SetProtection := SetProtection(pas2c(name),protect);
  4465. end;
  4466.  
  4467. FUNCTION SetVar(name : string; buffer : pCHAR; size : LONGINT; flags : LONGINT) : BOOLEAN;
  4468. begin
  4469.      SetVar := SetVar(pas2c(name),buffer,size,flags);
  4470. end;
  4471.  
  4472. FUNCTION SplitName(name : string; seperator : ULONG; buf : pCHAR; oldpos : LONGINT; size : LONGINT) : INTEGER;
  4473. begin
  4474.      SplitName := SplitName(pas2c(name), seperator,buf,oldpos,size);
  4475. end;
  4476.  
  4477. FUNCTION StrToLong(string_ : string; VAR value : LONGINT) : LONGINT;
  4478. begin
  4479.      StrToLong := StrToLong(pas2c(string_),value);
  4480. end;
  4481.  
  4482. FUNCTION SystemTagList(command : string; tags : pTagItem) : LONGINT;
  4483. begin
  4484.      SystemTagList := SystemTagList(pas2c(command),tags);
  4485. end;
  4486.  
  4487. FUNCTION DOSSystem(command : string; tags : pTagItem) : LONGINT;
  4488. begin
  4489.      DOSSystem := DOSSystem(pas2c(command),tags);
  4490. end;
  4491.  
  4492. {$endif}
  4493.  
  4494. END. (* UNIT DOS *)
  4495.  
  4496.